Increase supply (e.g., build more housing) or reduce demand (e.g., find a way to make it less important for people who want to work together to live nearby). Those are really the only two choices.
The public transit infrastructure, and road infrastructure, in Boston and SF is insufficient to make living further away ok for most people. But again, that basically just creates neighborhoods of software/biotech people and nothing else, which feels terrible.
It might also push the rent up in your neighorhood/suburb, but across the metro area as a whole, adding luxury housing lowers prices.