Try Develop Menu > Feature Flags > Reset Feature Flags (resetting Safari to default feature enabled config)Still a problem even after clearing out the cache. PDF's in Safari can still be grayed out and it is like they just aren't loading. The attached shows what I get.
Go to System Preferences > Screen Time > Content & Privacy, and see if that is currently turned on. If it is, turn if off then test out if you're able to access that online file. (possible reason content shows greyed out)
If restrictions are not enabled, then you'll want to test the computer in safe Mode. Safe mode will help to isolate if the issue is being caused by any third party software and also does a system check to fix any errors. Here's the steps to start in that mode: safe mode