The bay area, specifically San Francisco, is one of the best real estate purchases anyone can make. It's geographically constrained and has historically shown to gain value over the past 100 years CONSISTENTLY.
There will be some small bumps in the road here or there, but when you look back in 20, or 30 years, I can almost guarantee you're going to see pretty solid returns. At least you can rest easy knowing it was perhaps the safest real estate investment anyone (who can afford it) could make.
Want to get REALLY depressed? Consider this FACT:
Foreign investors (rich people) can purchase homes in the US (San Francisco), and have no requirement to live in them, or use them. They can be purchased as purely speculative investments and it happens ALL THE TIME.
I spoke with a real estate agent at a major SF firm, and asked them point blank - WHO can afford these insane home prices? He generated a nice little chart for me of the buyers by career. Software Engineers was number 4.
#1 - Foreign Investors (mainly Chinese) #2 - Trust funds #3 - I forget (this was 4 years ago) #4 - Software Engineer
How / why it's legal for foreign investors to hold onto homes that people could be living in is beyond me. It destroys communities, and seriously hurts everyone.
(I wouldn't wish the anxiety around this decision on anyone, least of all future generations, which is why I've resolved to buck the trend of homeowner NIMBYism.)
[1]: https://www.mercurynews.com/2017/10/19/housing-economist-pos...
[2]: https://www.mercurynews.com/2018/01/11/unpacking-the-bay-are...