To some extent, it's just numbers. People who work in tech in San Francisco are compensated well enough that living there is not a burden; the numbers are big for both housing costs and salary. Personally, I think the high cost of living areas work out in your favor. If the prevailing rent and food cost is $1/month, then it's going to be hard to ever find a salary that can pay for an iPhone. If prevailing rent and food costs are $5000 a month, whatever % they give you over the bare minimum will cover costs that are the same everywhere more easily. (As a corollary, keep in mind that rules like "only spend 25% of your take-home pay on housing" are not written with software engineers in high cost of living areas in mind. I pay 43% of my take-home pay on housing and the other 57% is a lot of money.)
The biggest cost of living issue that software engineers face there is 1) not working for FAANG but competing for housing with people that do (double if you have kids; remember that both parents can have FAANG salaries, and they will spend them both to get their kids into a good school) and 2) trying to save 20% for a down payment on a house while also paying rent. #1 is kind of a San Francisco thing; everyone wants to live in downtown Mountain View so they can bike 5 minutes to work, and Google pays better than the other companies nearby, so... if you don't work there you probably won't live there. Apartments in Mountain View are more expensive than Manhattan. My take is that the Bay Area really suffers from existing to serve one major industry; everyone else has the same job as you, and gets paid the same for it. There's also some personal preference involved; "I won't do algorithm interviews", "I want a 4 day workweek", "I want to work remotely" are all going to reduce your earning potential. Whether the upsides are worth it is up to you to decide, but you will be bidding against people that work in person 5 days a week that mastered the software engineering interview. As for #2, it takes time. Save as much as you can and you'll get there soon enough.