If you invest in a 401k or traditional IRA the money you take out is taxed as ordinary income and will be included in your MAGI to determine any Obamacare subsidies and your IRMAA Medicare premiums.
If you invest in a Roth version of either plan, what you earn is tax free and is not counted in your MAGI and thus does not affect your premium payments. So, you could earn $1,000,000 in your Roth and still receive Obamacare subsidies and avoid paying extra for Medicare.
ONE THE OTHER HAND, if you invest in municipal bonds paying lower “tax-free” interest to benefit governments in their borrowing costs, that interest is included in your MAGI and will negatively affect any Obamacare subsidies and will count toward higher Medicare premiums.
Seems like regardless of the source of your income – taxable or not – it should count toward being subsidized by other taxpayers for health care coverage. Either you have the income or you don’t, taxable or not is hardly relevant.