It's increasingly common for financially well-off people to marry other financially well-off people, perhaps contributing to income inequality. So, if you both share parenting duties (1-3 hours a day of individual work plus daytime child care, and being flexible with night time duties), it's doable if one of you has a high-paying steady job and the other is taking on more risk. In fact, with marginal tax rates in CA and NY approaching 50% it might actually be more efficient for one spouse to receive compensation through building equity.
Alternatively saving a lot of money before you have kids and living frugally by working in a lower cost metro area or renting outside of SF/Palo Alto can work. It's obviously a risk so you and your family has to be on board.