The 40% investment could presumably go into jobs and infrastructure that might be more durable.
I personally would implement it as a "civilian military" to make it a cool high-status line of work that people might choose for a few years out of civic duty. Uniforms, ranks, bases, parades, you get your food/housing provided, you get 'deployed' on projects. Get your college paid for if you stay on long enough.
On the upside, even if AI is a bubble and implodes spectacularly we're going to have metric tons of compute available for climate models, drug discovery and anything else that requires a super computer to model.