With government spending helping to steer countries through the pandemic, it may not be easy to turn off the taps afterward.