I think the power of tools like cFIREsim isn't the median projections, but the range of expected values. I wouldn't be very happy with $800k median but a 40% failure rate.
With that said, I'm not sure I'm following your math. You're saying that investing $300k for 30 years results in $800k, and that I'd need $170k over 17 years of no mortgage to match the return? It hardly seems fair to compare a 17 year return to a 30 year return, even in nominal terms. Did I misunderstand?
I'm saying that investing $300k for 30 years
and using it to service the mortgage payments results in a median leftover portfolio of $800k (in inflation-adjusted terms). The success rate (i.e., the chances of coming out ahead by keeping the mortgage rather than prepaying it) is 95.65%, with an average leftover portfolio north of $1 million--but I think the median is a more useful number, because it tells you that 50% of those cases had a leftover portfolio of more than $800k.
(To replicate these results, enter $300k as the starting portfolio amount and $17,187 as the annual spending amount, which represents annual principal and interest payments assuming a 4% mortgage rate--obviously, if you can get a cheaper rate, the chances of the investments outperforming the mortgage (and the resulting leftover portfolio after 30 years) will be even higher, and vice versa. Set the spending plan to "not inflation adjusted" (because it isn't, which is the beauty of the mortgage option), and leave all the other inputs on cfiresim's default settings. Tinkering with the other variables will adjust the results accordingly--for example, increasing the equity allocation will generally produce even better results.)
So far, this is all still the straight investments/mortgage arbitrage analysis (i.e., not accounting for any of the considerations that led you to start this thread). The $170k and 17 year figures came in after introducing the variable of financial aid for higher education (but still ignoring all the other "freebies," because I thought you had said that you can probably still obtain most of those by refinancing into a 30-year and lowering your annual outlay). $170k was my approximation of what that arbitrage benefit is worth to you today, because $170k is the portfolio size you would need to have at the beginning of the 30 year period in order to grow into a portfolio with an expected median ending value of $800k after 30 years--if the financial aid has a present value of less than $170k, it's better to keep the mortgage, and vice versa. I wasn't ambitious enough to try to approximate the then-present value of the arbitrage benefit at multiple points spread across the 17 years from the time you retire until the time your youngest kid finishes college (i.e., the period during which you would actually be receiving the financial aid), but it is obviously something much higher than $170k in nominal terms.
But your comparison isn't really surprising. I don't expect prepaying my mortgage to pay for itself with just 12 years of financial aid. I expect it pay for itself with 12 years of financial aid, plus 10 years of free/subsidized health care, 10 years of reduced taxes, 10 years of not paying mortgage interest, plus the potential for 10 years of EITC if and when we decide we need the money. I'd ballpark those numbers at a total of around $300k over 10 to 12 years, for an up front cost of about $200k now, but the xirr on that list is a bitch because if you leave the money invested you have to account for the amortized payments for the duration, and that cuts into your returns too. So it's not as simple as comparing the profit from $200k invested for 10 years to the $300k of benefits received over 10 years (in which case I would have to earn about 9.6% on my investments).
You can isolate each of the freebie variables and do an analysis similar to the one above to determine if the mortgage pays for itself with respect to that variable. Like EscapeVelocity, I'm surprised that your numbers are coming out the way they are. For my situation, looking at healthcare in isolation (since ACA subsidies were my primary concern when I thought about this), the math favors keeping the mortgage. My non-houses expenses are pretty close to yours, but my mortgage balance is much higher and my family size is one kid smaller, which means if anything your situation should pose even less risk of missing out on ACA subsidies. However, I've been doing this math on the back of an envelope rather than an excel spreadsheet, so I stand to be corrected if I'm wrong.
But since we'll only have 10 years left on the mortgage anyway, that also tends to push me towards prepaying it. Even more so if the inflation outlook at the decision point still looks reasonably low, like it does today. That ten years will include all 8 years of college for our older two kids.
Yes, if the "to pay off or not to pay off" comparison were limited to the 10 year time horizon I would probably reach the same conclusion as you. But I'm talking about the alternative path of refinancing into a 30 year mortgage.