It sounds like you had held up San Francisco and a startup job as being some sort of perfect ideal. This type of thinking usually results in feeling unhappy later.
San Francisco is just one city among many in the world. It may or may not be right for you. Believing the hype that "NYC is the greatest city on earth" or "San Fran is the only place where smart developers go" is a surefire recipe for disappointment.
It's your life and it's up to you to find the balance that makes you happy. Congrats on realizing this and having the courage to do a 180.