I had what seems like the same problem. I changed my Apple ID a few years ago, but I've long been "notified" that I need to update my password in Settings. Every time I went to do that, it asked for the password for my old Apple ID -- I don't know that password, I no longer have access to the recovery email, and Settings would not let me change the Apple ID even though I have been using it since then. I just lived with this "badge notification."
When I switched my cellphone carrier recently, it came to a head because I lost access to iMessage. I think this was a manifestation of the same problem. So here is what I did, and now it all works fine:
- I turned my iPhone off then back on again (maybe not a necessary step, but it seemed like a good, hopeful step.
- I went into Settings and clicked on the top selection (MyName, Apple ID, iCloud, Media & Purchases).
- I turned off iCloud and signed out of Apple ID, even though it showed the correct Apple ID at the top. It gave me several prompts, and I saved things where it seemed appropriate.
- I signed in again to my Apple ID (again with my current ID and password).
- I checked everything.
- I had to manually enter the security codes on credit cards in Apple Wallet for some reason.
- I synced my phone with my Mac desktop, just to save everything. But first, I noticed that somehow my backup had gotten changed from "this Mac" to iCloud backup. I manually changed this back to "this Mac" then ran a backup and synced my iPhone.
- That was a week ago, and everything seems to be back to normal now. I have iMessage again, and I don't get those pesky notifications that I need to update some old Apple ID that no longer exists.
This solution seems pretty similar to others I've seen, but some things I didn't do and they seem unnecessary. I also found a couple changes I did not make that I needed to correct, so I would suggest checking everything that might use Apple ID.
I made an appointment with Apple Support when I was struggling with the problem, but got it resolved before that phone call.