iPad keeps asking for Apple ID login
First reset your iPad: Settings > general > reset > Erase all content and settings.

Then go to icloud.com and click on reset password and reset your password to something complicated and not at all similar to the old password.

Now set up your iPad as a new device not from a backup (which may have the presumed virus) and sign into iCloud with your new password.

Keep an eye on it and watch for unusual activity on your icloud account.

Then take your time setting up your accounts and re-downloading your apps on the iPad.

Yeah I would do it that way rather than restoring from backup, it's a PITA but you'll have a clean iPad.