If there was one welcome development from the first week of the election campaign, it was the general acceptance that Britain needs more investment and that the government should pay for it. More than that, the two main political parties now agree that much of this investment should by financed with borrowed money, taking advantage of the ultra-low interest rates that the UK pays on its debts.

It is a moment to celebrate, following almost a decade of austerity, when the main aim of the Treasury was to bring down the government’s annual spending deficit at the expense of, among other things, public investment.

Now there is an arms race between Labour, the Tories and the Liberal Democrats to outdo each other with proposals to repair some or, in Labour’s case, pretty much all of the fraying fabric of public services, infrastructure, amenities and welfare provision across the UK.

The shadow chancellor, John McDonnell, says he will combine a £150bn “social transformation fund” to pay for upgrades to schools, hospitals, social care facilities and council homes over five years with a £250bn “green transformation fund” to be spent over 10 years. This £55bn a year boost outdoes Sajid Javid’s £20bn a year extra on capital projects.

Some of the credit for this turnaround must go to the leftwing thinktanks that have chipped away at the arguments for austerity ever since former chancellor George Osborne declared in 2010 that it was the only way to bring the deficit under control. Then, Osborne had important support from the International Monetary Fund and the OECD, the Paris-based thinktank for the richest 36 nations. In recent years, these organisations have conceded that a financial crisis should never be allowed to go to waste and, rather than panic, it would be better for a consistent policy of public investment to remain in place.

Facebook Twitter Pinterest John Major with Ken Clarke in 1993: the PM backed his chancellor in putting a red line through hospital refurbishments and new school buildings. Photograph: Malcolm Gilson/Rex

The idea that governments must step in when capitalism’s flaws are exposed by tottering financial markets is not new. It was the central theme of John Maynard Keynes’s work after the 1929 crash.

For this reason, it is tragic that it took so long for the main international lending organisations to realise their mistake. The consequence of their support for ideologically driven policies to shrink the state during Osborne’s time at the Treasury caused tremendous harm to millions of families and meant the UK was unable to build on New Labour’s earlier efforts at investment.

The question must now be: will this new burst of investment be sustained through the next downturn or be turned off when another recession hits and Whitehall budgets again come under the spotlight?

John Major’s response to the early 1990s recession was to save money by cutting public investment. He backed his chancellor, Ken Clarke, in putting a red line through hospital refurbishments and new school buildings rather than increase borrowing or impose tax increases.

When Tony Blair and Gordon Brown switched the spending taps back on in 1999, the need to wake up and retool the construction industry and marshal a public sector more used to imposing austerity pushed the cost of investment up by many billions of pounds more than it should have been.

Osborne’s clampdown has left the construction industry and the public sector in much the same position today, as the parties consider how and what to improve.

It is a criticism made last week by the Institute for Fiscal Studies, the tax and spending watchdog, which said Tory and Labour plans could be undermined by the lack of shovel-ready projects.

While it will be disappointing for ministers to miss spending targets, policymaking should be more considered, consensual and take a longer view. Dirty words such as planning and strategy should come back into vogue. A focus on investments in green technologies and environmental improvements could be a spur for all policymakers to move in this direction.