I grew up in the bay area and spent 40 years there, most of it in Castro Valley. For inspiration, though, I'd look at the northern coast, Mendocino
area, the Russian river area, and the redwoods in Eureka. If the schools are the most important thing, look at Lafayette and Danville.
As mentioned, north bay will probably be better for the recreation you listed. Kinda depends on what hiking is to you though. There is a surprising amount of little areas on the peninsula if you know where to look(and for very local, you don't mind the same 2 or 3 trails over and over again).
The city itself has a weird school lottery thing(attempts to balance out education opportunities across different social groups). As I understand it, this is why affluent neighborhoods like Noe Valley are chock full of baby carriages but hardly a kid over 5. The parents who can afford to go to places like Menlo Park when kids hit school age so they don't have to deal with the school lottery in the city.
Generally speaking, housing costs are higher on the peninsula and drastically higher in the city than surrounding areas.
Such a generic set-up. Even if you lived in Mariposa (near Yosemite), you would only have a 4 hour drive to the coast. What do you prefer? North Lake Tahoe is great in the spring and fall, when the tourists are gone. Lake County is great if you want seclusion with an hour drive to civilization. Sonoma/Napa valleys are great if you have the money to live there. Monterey is killer if you can handle tourists year round (cant beat a drive through Big Sur). You can find good schools in any city, just look up the scores online and pick your home within the appropriate district.
I moved to Crescent City a year ago. I though I would only be here a short time while I looked for work in Oregon but we don't want to leave now. We have the redwoods on the south side and the Ocean to the west. A few lakes and lots of great hiking and offroad driving trails. I don't like the housing available in the city. Just outside of town there are lots of really nice places with acreage and trees and reasonable prices We are isolated from any real shopping; if you like hitting the mall it's an hour or more. For all your regular needs we are just across the border to duty free shopping in OR and there is plenty in town.
That's the great part of CA. No matter where you are you are close to the Ocean, Lakes, Rivers and Snow. The more money you want to spend the closer to the beach you can get. The "Safe" factor is more of a relative term. Every city has good and bad parts. Some more than others.
Hate your job? There's a support group for that!!! Its called everybody and we meet at the bar.