Investing in economy simply means creating businesses, companies, industries, building schools, building hospitals, creating good transportation systems, building good road network, providing good water, security, providing constants electricity etc.
I agree, investing into the current situation is a bit of a big profit because inflation and now upcoming recession means that there will be cheap money and cheap labor everywhere. So if a nation decides to reinvest whatever it can back into the nation, just to get ready for the future, they would be in profit when the time comes. It's the perfect time to invest, it would create jobs, build stuff, and everyone would benefit from it.
I personally know this, which means that politicians must know it as well, but guess what's going to happen? It's going to be more likely to just end up with politicians making each other richer and not caring about us at all.