Hard to offer good advice based on the limited information you provided, but let me ask you some questions and make some comments:
Do you actually have a job lined up out here? Things are tough. Only 1 of the half-dozen pain guys I know are actually doing pain, including people that trained out here (which I suspect you didn't). If you don't have an offer, it may be a moot point. If you DO, well, might want to take the rare opportunity.
Lots of people have advised you to choose the midwest based on cost, and someone wisely pointed out that the "midwest" is not a homogenous target, and you'll find lots of cities with equal or better urban living. That said, visiting someplace is not like living there. The advice you've received is mostly from people who spend a lot of time thinking and posting about money and some pretty dark scenarios. Not judging, and maybe they're right, but the fact is a lot of people on this board are pretty pessimistic and that colors their advice.
And speaking of costs, can you stomach shelling out a cool million for a pretty mediocre 2-Br condo in a so-so part of town? Do you have 300K in cash for the down payment (yeah, they require 25% down, and no, I don't know anyone who's found the so-called physician loan with a lower down payment). If not, then you're looking at $4000/month to rent a similar condo. Of course, you can pay less in worse parts of town or in the burbs, but if THAT's your plan, why come here at all? You mentioned your 5 yr-old kid. Do you have plans for private school? Since you're new in town and not politically connected, you can bank on doing poorly in the school lottery. Want to drive your kid to Bayview every day for school, or shell out $30K+ per year for private school? Or, again, move to the burbs, but, of course, if you're gonna live in the burbs, you could be anywhere but here.
Ready for 10% state income tax and no mortgage deduction while you rent to save for your down payment?
All that said, I really like my job and I like my life out here, but not for the reasons most people think they want to live in SF. I'm not sure where you're coming from, but as a city, for an urban experience, it's pretty mediocre. Yes, the food is great, but the best places in most real cities are just as good (but the average place here is easily better than the average place elsewhere). The real joy is being among mostly like-minded, politically liberal, socially-conscious, community oriented people. There is a social tolerance here that I haven't seen elsewhere (and I came from Chicago which I thought was VERY liberal). And being close to nature, which I didn't think I'd care much about before I got here. And the culture is one of, not so much indulgence, but pleasure. People are a little more laid back and appropriately focused on leisure in a way that suits me. SF is close to a lot of fun, beautiful things that, if you just visit here, you'll likely never get to embrace.
The comments about CA in general, I think, may be unfounded. Yes, our absolute debt is high, but per capita, I doubt it's any higher than anywhere else (and, BTW, we have the world's 9th largest economy). Yes, maybe our unions are a little stronger than most, and maybe our entitlement programs are less solvent than others, but I don't know if that's a great reason not to live here.
All THAT said, I spend a lot of time in Mpls and Chicago, and those are incredible places. MUCH lower housing costs, MUCH better public schools, similar salaries, better (MUCH, in the case of Chicago) urban life, friendly people, parks, museums, theater, food, culture, proximity to nature (in the case of Mpls, anyway).
Anyway, that's my take on it. I've lived in the Midwest (MN, IA, Chicago) and SF, so feel free to PM me if you have specific questions.