In the center of tech-job-land (SF/SV), you're looking at a $1M mortgage if you have a family you dont wish to raise in a 640sqft studio. Part of what you're paying for is the pool of jobs and easy availability of work.
Secondly, I lived quite frugally in my early career. This is much harder 10yrs in...because those choices affect my children. What do I give up on? Braces? Health? Here in the US you get nickle and dimed on literally everything, and especially on healthcare.
Finally, you are missing a major hidden cost -- risk. Numerous tech jobs can rarely survive 10yrs. Often, you find yourself out of work in the worse economy finding a new job when prevailing wages are depressed. Tech isnt like government, or teaching, or medicine -- there are harsh cycles. Worse, in those cycles, often your company stock/options are also worth farless/zero.
$300 is the purchase price, not the mortgage.
Salaries around here for skilled software engineers are typically $100-150k, depending on years of experience and field.
A friend of mine in the same area is working remotely for a major SV company making $175k.
For the love of whatever you consider to be holy, don't think that the SV lifestyle and cost of living are representative of the country as a whole.
And sure, it can be tough to find a tech job that lasts 10+ years. But that's true of a lot of jobs. Tech jobs don't have to be in "tech" companies. Lots of businesses have tech jobs in house; insurance, healthcare, etc etc. Unless you have a burning desire to work for the FAANGs of the world, there's a billion tech jobs out there.
It also goes to show how the advice from people like Mr. Money Mustache [0] actually works in the US. Even without large salary increases, the US engineer in your example could realistically pay off their $150-200k mortgage in <10 years by living reasonably frugally, and then get to work on building a hefty retirement fund.
If they did get salary increases and/or had a partner earning money too, they could do it much faster.
Am I missing some hidden cost, or is this actually quite common?
[0] http://www.mrmoneymustache.com/