I drove from Upper Noe Valley to work in Palo Alto for a year, and it was totally manageable. Our apt was less than 5 minutes from 280 S entrance, and if I left a bit before 8AM, would get to work in about 40 minutes. Leaving after then was a bit rougher, though.
Eric mentioned Burlingame. I did Burlingame to Palo Alto for a year before that, and I loved living there. Took about 30 minutes to get to Palo Alto (had to go through Hillsborough), but imagine the commute from there to Sausalito would be only about 5-10 mins shorter than if living in San Mateo.
Good luck with whatever you decide!
Yes, this commute to Sausalito will be long, especially given you have to drive through the city to get to Marin. However, this is a convenient spot if you work in Palo Alto.
San Francisco Proper
This is the most neutral from a commute standpoint. The downside is that raising a small child in most neighborhoods can be challenging given the space. If you were able to get a property in Bernal Heights, Noe Valley, or a similar neighborhood, that would be easier.
Other areas to consider:
Burlingame is quite nice, family oriented, real estate is expensive, but will maintain it's value because of it's location.
East Bay has a few spots that would be suitable for a family and would be an easy commute to Palo Alto, but not for San Mateo.