Once the size of government has been decided upon, then buying the things that the government wants to buy is easy. All that matters is that there's enough real resources available for them to buy without people jacking up the prices for everyone else.
In the case of pensions, the question is whether or not there's enough stuff for retirees to buy.
In the case of education, the question is whether there are enough teachers to provide the education.
In the case of healthcare, the question is whether there are enough medical professionals, medicines, etc. available.
In the case on infrastructure, are there enough engineers, architects, building materials, etc. for the government to spend money on without causing an increase in prices that the private sector would have to pay for the same things.
If the answer is yes, then funding it isn't a problem. If the answer is no, then it might be best not to do it.