You have to consider the trajectory. SF is already a dumpster fire, if enough affluent people leave, property prices will tank and you will be paying off a mortgage for a larger sum than what the property is worth.
Meanwhile, all these affluent people have to move somewhere, the properties in these places aren't going to stay cheap forever. So you can get a cheaper mortgage in those places to pay off a property that will rise in value.
Of course, that's all speculation. Prices in the "good places" are already high anyway, if you really want to strike a bargain you have to buy into the places that are still up-and-coming.
The stock market hit all time highs during the pandemic while the economy is in shambles. Why? Because there's a lot of cheap money chasing those assets, and it's going to stay that way for a long while. Therefore, those house prices may still nominally rise or at least stay stable, even while they're losing value.
You have to look at it in terms of opportunity cost. What else could you have bought for that money? If prices rise in SF only because of inflation, prices rise even faster in those places where there's a real increase in demand.
I did see some homeless people, but overall it still felt like a nice place. Of course I avoided the tenderloin and other dodgy areas (and this time I didn't use the BART, unlike previous times).
Meanwhile, all these affluent people have to move somewhere, the properties in these places aren't going to stay cheap forever. So you can get a cheaper mortgage in those places to pay off a property that will rise in value.
Of course, that's all speculation. Prices in the "good places" are already high anyway, if you really want to strike a bargain you have to buy into the places that are still up-and-coming.