For the highest potential of appreciation, you may have to get property specific. In other words, not too close to the train; the unit should be nicely upgraded; in-unit laundry (which most of them have). That sort of thing.
As far as buying brand new or resale - I don't think that matters - as long as it's not too old. Try to buy something less than 10 years old - or less.
To stay in the sun, just don't go north of, say, Millbrae.
Your best appreciation potential would be a single family home rather than a condomium or townhouse. You can find a very nice home in very good shape for under $800k in Santa Cruz.
Here are some to consider that are inside a 10-15 min drive to Palo Alto Business Centers.
These areas have seen a run up of 15%-25% in some...today, there has been little.