> I did not earn any of that?
>> A doctor's wage is earned.
Your wage is earned.
> invested most of my income in that 20 years in to dividend paying stocks
Whether that one is 'earned' is debatable. From a neoliberal economists perspective you probably 'earned' it by risking your income. Although I always have to chuckle a bit of someone says that speculation is 'investment'. Investment is buying machinery, investment is specialization training of workers, investment is research and development. Playing roulette on the stock market is hardly 'investment'.
From a moral perspective you probably didn't 'earn' it. You didn't work for it and - since you were able to put it aside for a later use - you didn't actually 'need' it. So from a moral and societal point of view, that money should have rather gone to pay for teachers wages, for infrastructure or anything else that was of immediate necessity. By investing in the stock market, it probably just went to some banker's bank account.