The problem for industrial states isn’t that the people can’t afford to move to San Francisco and become programmers (good luck with that plan, even with low housing costs), it is that the local factories shut down and moved to China or Mexico or wherever labor is cheap and regulation is nil. If they still had their middle class manufacturing jobs, they wouldn’t need to move, and they’d have healthcare. So it is at least partially globalization’s fault.
Basically every large city in America is struggling to build enough housing, not just the Bay Area. Furthermore, there are a vast number of jobs to be had that aren't software engineering.
I concede that globalization has changed the economic landscape, but it's effects didn't have to be nearly this negative. Had we invested in infrastructure and prioritized the building of new homes people could have adapted. Now we have homeowners capturing an extreme share of wealth for doing nothing but further exacerbating the problem.
And relying on protectionist policies to subsidize certain industries certainly isn't a plan for long term success. How would American manufacturing compete with a fully industrialized India and China?
Basically every large city in America is struggling to build enough housing
Are they? How about Detroit? I know it is shocking to Californians, but many people would be happy working at the Lordstown GM plant in Ohio if it was still open. Telling those people that the real problem is that rent is high in San Francisco, not that they lost their job is a total misread of the problem and the causes of the problem. If we magically had 10 million free apartment units in San Francisco, it does very little to help the rust belt.