Had same issue on iPhone and iPad with iOS 27 due to two Apple accounts being use on both - one account was iCloud and my old iTunes account which holds all my Media and Purchases. Both accounts are Australia accounts.
Whilst my iCloud account was 18+ verified, my iTunes account was not.
Only way to do this was on a second device like an iPad.
Sign out of the iCloud account and sign in using your iTunes account. In my case, the iPad automatically signed me into my iTunes account because it was already being used for Media and Purchases.
Once signed in go into Personal Information and complete 18+ verification like what was done for the iCloud account. In my case, Apple decided it already had enough information to verify my age and noted as verified.
Tested on the iPhone and I was immediately able to turn off Content and Privacy Restrictions.
Logged back into my iCloud account on the iPad and all was back to normal there too.
A lot of fuss that could have been communicated better by Apple.
Would be great if Apple could enable long term users the option to link the Apple ID’s.