The alert badge that you observed is not necessarily an indication of something untoward or sinister - but may indeed be something that you do need to verify/check and correct. If the badge directs you the settings App, the alert has been generated by your device. Your Passcode relates to your device - and not your AppleID credentials.
Perhaps you were transferring your data and settings from an old to new iPad - or having setup the iPad “as new” have synchronised your existing iCloud Keychain (Password) with you new device. Your iPad will automatically alert you of account credentials/passwords that have been potentially compromised through a data-breach, or are unsafe for a variety of reasons.
From iPad settings, check you stored passwords:
Settings > Passwords > Security Recommendations
Here you will find details of Passwords that may have been potentially compromised for which action is recommended - or Passwords that are otherwise considered unsafe.
Additional information can be found within the iPad User Guide. Here is a direct link to the appropriate chapter of the Guide:
Change weak or compromised passwords on iPad - Apple Support