I would suggest that you do the following:
1. On your iOS device (and anywhere else you are signed into iCloud with Contacts turned on), and turn off Contacts. When you do that it will ask if you want to keep or delete the Contacts from the device/computer where you are turning them off. Select to KEEP them.
2. Then go into the Contacts app on iCloud.com and select them all by selecting the first one, hold down the Shift key, and then use the Down Arrow to select the rest. Then click the Delete button to delete them from iCloud.com.
3. Now, go back to your iOS device and turn Contacts back on. It will ask if you want to Merge them with iCloud. Select MERGE. Turn on Contacts in all the other places you turned them off and go ahead and Merge to ensure that you all of them get there (if one has a contact that another doesn't or something - they won't duplicate).
That should resolve the issue. I cannot begin to understand what happened, but this will restore everything the way it should be, and you can be extra alert for any untoward happenings going forward.
I have had Family Sharing set up for some time, and have had no issues like this, so not sure what might have happened? I am a bit confused when you state that you have access to "calendars, contacts etc as you would expect". Family Sharing provides sharing of Family Photo Albums, Family Calendars, and purchases, but as for normal iCloud stuff, that's it. It also provides a Family Sharing service for Apple Music, and now provides a Family Sharing service for iCloud Storage, but there is no co:mingling of data in the shared iCloud Storage scenario.
Cheers,
GB