It's definitely possible, even likely, that real estate is overvalued in the bay area. That doesn't mean it's a "bubble" in the sense that it will "pop." The biggest risks in this area are increasing interest rates (reducing affordability at any given income level) and private equity bubble pop (causing layoffs at startups). The housing bubble 1.0 issues do not exist (this time it's different! buyers are hugely qualified on paper, decent down payments or all-cash, low DTI, etc.) In my mind, it's entirely possible that real estate just goes sideways for a long time. So I'd give the same advice you will see anywhere: buy a home for shelter, if the calculations favor buy vs. rent. But as RE speculation, it's not a great bet.
p.s. other risks are a sea change in housing policy. Right now, the NIMBYs and "misguided lefties" are keeping land values extremely high by opposing high-density development (or any development), opposing expansion beyond urban limits, championing rent control and BMR units (which increases the price of market rate units), and so on. If the housing crisis reaches a tipping point, I could see someone with authority (governor, state legislature, prop XX) paving the way for of-right development, which could easily destroy (or at least moderate) land value (basically, you'd see housing prices similar to Houston, Phoenix, etc.) I'm not even saying that's a good thing, just a possibility if we completely drive out the middle class.