Yes. In inflation adjusted dollars spending on AI dwarfs previous "megaprojects". But as a fraction of GDP it's fairly modest -- comparable to the Apollo Project.
It's a sign of how much the economy has grown that under "1% of GDP for a few years" now is far bigger than "over 10% of GDP for a few decades" was in the late 1800s.
You seem to be implying that railway spending was "over 10% of GDP for a few decades" in the late 1800s. If yes then can you trace that back to a methodology? I tried and found much lower numbers, around 3% average over the peak decade.
https://news.ycombinator.com/item?id=44805979
Your estimate of current AI spending is also low. Hyperscaler capex alone is around 2% of US GDP, not including other costs (neoclouds, employee comp, etc.).