I'm not sure how you fix it. The organic fix ought to be that businesses want to move out of the overpriced cities. But if that's also where their employment pool and investors are, that's tricky.
UK has had the same issue. The salary gap between London and anywhere else is huge. So everyone aspiring for a high salary wants to move to London. So prices are drastically higher. And there's no rebalancing in sight.
Maybe there's space for some government regulation? Tax cuts for companies hiring in lower CoL areas? No idea. But so long as an increasing pool of people is competing for a barely growing pool of housing, it's not going to get better.
We've conflated having a home with a financial asset. We can't have plentiful affordable housing without decoupling this idea. Houses are a poor financial investment once you remove all the incentives involved like mortgage tax credits, fixed mortgage rates, and obstructive zoning rules. Buildings age and not productive assets and can only be a good financial investment if we deem having more of them is wrong. This will be a painful transition given most people's wealth is a single building they live in.
I know it’s not universal, but IME it was very common for new CS grads to make much then what is discussed here, and far more after a few years. And this was before COVID and the AI boom.
The idea I see presented that even the highly paid tech workers at the big companies can’t afford SF is not really true.
https://www.craigslist.org/search/subarea/sfc?cat=apa&max_pr...
However, remote work has fundamentally changed the equation. Expanding hiring beyond the Bay Area, or even internationally (for example, hiring remotely from Canada), can dramatically broaden the talent pool while significantly reducing costs.