This is an interesting question.
Real estate typically appreciates at the same rate wages do, which is the same rate of inflation. If we assume inflation averages at 3% a year, then when you turn 66 your home will have appreciated to $2,454,000. With a purchase price of $1,100,000 and a down payment of $300,000, you'd walk way with $1,354,000 in gains.
Of course there's the loan, so I ran a 30 year mortgage on $1,100,000 at 2.75% -- at year 20 the loan balance would be $470,600. That would be an additional $629,400 for a total walk away of $1,983,400.
If you invest $50,400 a year into the stock market, you'd have to average a 6.15% rate of return over that 20 year period to end with $1,940,000.
This comes down to if you really want to live in an apartment compared to a house, and if you invested in the market, if you felt you could outperform an average return of 6.15%.
**All above answers are provided as general information only. No warranty is made regarding the fitness or accuracy of the information provided in this answer. You should seek advice from a licensed CPA, attorney or CERTIFIED FINANCIAL PLANNER™ as to your unique financial situation.