Why do you want to own a home so badly? Most people in NYC are perfectly happy to rent. But if you plan on staying in the city long term and have a tech salary you can definitely buy and save money eventually.
> Plus, my understanding is that back east, tech is what companies use rather than what companies make, so at most companies you'll be in a supporting role rather than building the products.
The first part is definitely kind of true, the second part depends. If you're really passionate about tech as an industry then yes you might like SF more, but if you care about products that provide value to everyday people and not Uber for X then maybe you'd like NYC companies more.
[1] https://ny.curbed.com/2017/8/2/16082774/nyc-vacancy-brooklyn...
The "NJ option" in particular is definitely trending - a friend just bought a house near Union City for around 300k and its a 35-45 min commute into Manhattan.
You don't have to live in PA to find something affordable. From what I know about the bay area, that radius of "I just can't afford this" housing is much larger.
One very good thing about NYC is the subway. It might be crowded, dirty etc but it runs almost all times. I remember during severe winter and during Sandy, very few trains were canceled and that too just a handful of days.
An hour on Metro North gets you into reasonably priced home areas.