If the OP is at all interested in the industries he says he is, then NYC all the way. It is a better city than SF on virtually every metric except burritos and nightlife.
The reason I left NYC was that it didn't have a vibe for "technology for technology's sake." If you're a more low-level engineer (knee-deep in circuits and C) then NYC is really going to push against you; the opportunities are fewer and the culture surrounding you values that less than financial sales or 'hustling' (Adafruit being a counterexample). You'd have to specifically hang out around Columbia, drive upstate, or grab the Fung Wah to Boston to get that kind of vibe. In the Bay you're immersed in it.
The reason I left NYC was that it didn't have a vibe for "technology for technology's sake." If you're a more low-level engineer (knee-deep in circuits and C) then NYC is really going to push against you; the opportunities are fewer and the culture surrounding you values that less than financial sales or 'hustling' (Adafruit being a counterexample). You'd have to specifically hang out around Columbia, drive upstate, or grab the Fung Wah to Boston to get that kind of vibe. In the Bay you're immersed in it.