I can totally understand your plight - I live in SoCal as well, my daughter lives in Irvine with her mom. A while back I modified my career to be able to work from home and then decided to buy further east, I now live in Redlands. For your price tag, you would basically have to go East to at least Corona and keep going from there. There are nice areas out there, totally understand if you can't work remote and the commute is not doable. Consider - sacrificing now can lead to greater ability to live where you want in SoCal later.
As far as trying to compare these decisions, there are certainly quite a few additional items to factor in from the real estate side. I feel building a spreadsheet is really needed to compare this properly. There are more but these are some big ones. Intuitively people know that successful real estate investment can get someone very rich.
1. ( Profit from inflation) , mortgage payment stays the same over 30 years, rent keeps going up. That mortgage payment in 30 years has a significantly lower impact on your monthly finances. (Insert "believed" monetary inflation number here - 3-7%)
2. (Equity) Gain in equity over time via principle paydown (Rent vs mortgage being equal, at some point your house is paid off and doesnt cost a dime). If you keep renting, you will have to rent until you're dead.
3. (Leverage) When property values go up, they go up as a percentage of the entire purchased value, not a percentage of your down payment, this is massive leverage that can work in your favor when selling and/or also the reasons below. 5% return on 50k a year is $2,500. 5% a year on 500k is $25,000. A few years of that, then sell and the stock market returns compared will never touch that. (yes, we are higher in real estate prices now, just want to comment on this in general)
4. (Tax deductions) Mortgage interest, property taxes are tax deductible. If selling and you owned and lived in the place for two of the five years before the sale, then up to $250,000 of profit is tax-free. If you are married and file a joint return, the tax-free amount doubles to $500,000. (Lot's more deductions)
5. (Options) Ability to buy, live in it, later move out, then rent it out. A good rental can easily gain 13% cash on cash return with very low volatility w/ standard down payment.
(Depending on rent to value ration in your market, varies highly, you *can* still get those returns in certain parts of the country even now, not SoCal though unfortunately. Just bought one in Memphis and ended up w/ approx 12.5% cash on cash)
6. (Leverage/Options) When a property gains sufficient equity you can perform a cash-out ReFi and use low interest 30 yr funds for additional investment, real estate allows low risk leverage that is pretty unique... (opportunity cost)
7b. (Not a financial factor) Ability to control your surroundings, engage in home renovation projects (may not be a personal desire, certainly is for me, just a life enjoyment factor). It's hard to quantify this one, when I bought my first house I felt an amazing feeling of freedom and control of my own destiny.
Some points to consider....