The lurking issue here is Prop 13. It forces cities into a tragedy of the commons type scenario where it's not rational for any individual city to build new housing, as property taxes are limited, while they can more easily raise revenue by bringing in jobs and retail.
>...we should pass more laws mandating that the housing we can't build should be built anyhow, apparently by magic?
Unfortunately, it seems like Prop 13 is not going to get repealed anytime soon. Given that, then in this case, yes, more regulations could help.
It's called a Pigouvian tax [1]. Whenever a city like Menlo Park brings in 2,000 more Facebook employees while allowing for zero new housing, they impose a negative externality on their neighbors, who suffer in the form of higher housing costs. To counter that, cities should be made to bear the social cost of exacerbating the housing crisis. If every time a city like Menlo Park adds thousands of new employees without any new housing, they had to pay large fees into a state affordable housing fund, they'd have less incentive to contribute such a large housing imbalance in the first place, and everyone would be better off.
This was a result of microsoft's settlement with the DOJ over the anti-trust case. Since then all microsoft docs end in .*x and are simply zipped xml files with an open format.