Try closing the editor and visual studio/code editor, back up your project, then delete the Library folder, then open your project again through Hub - it’ll take a while starting up if you have a lot of assets but might fix it (has for me with upgrade-related issues). Not worth messing with project settings or modifying stuff until you’ve tried that… if you haven’t yet.
It could be internal HDRP shader utilities using lots of internal keywords (haven’t deeply looked at this) that normally aren’t considered based on platform/hardware, and indirectly adding them to the Always Compiled list forces Unity to try to compile every variant upfront. That’s a shot in the dark though.