A friend asked me if software was a good profession to work once and earn forever. He said people like Bill Gates inspired him to build such a model. I thought it was an unique aspect to consider to decide whether he wanted to get into the software domain or not.
I am not sure of whether software is suitable for this model or not. Maybe it is quite possible. But one thing I know for sure that in software, or for that matter in any technology, changes are the norm. Not because technologies are evolving, but because our needs are changing quite rapidly. We end up using so much technology nowadays, that change in one can prompt change in another. It is pretty difficult to stay away from changes.
Going by that, I think it will also be pretty difficult to build something that can serve all the changes. You can build something as generic as possible, but you will have to keep coming up with newer solutions as problems change and new problems arise. So, work once and earn forever scenario in software might not be suitable. Though I see that it happens, and it usually ends up in wrong or inefficient solutions. I am tempted to say that companies and individuals that do not keep building new tools and solutions will soon become irrelevant in the software industry.