I don’t see them shutting down all the long haul routes in the next decade or two. They would have to keep servicing the segments with shorter routes, which probably means they’d have to invest in some infrastructure, and I don’t see them getting the funding for that anytime soon. And even if that happens, they would probably save a couple of long haul routes for historic or cultural reasons. And given how popular the Empire Builder is, and how sparsely populated areas it goes through—meaning it is harder to justify the infrastructure that enables shorter routes—the Empire Builder will probably be the last long haul route to go.
I think the Empire Builder will still be there in 2040, even if it will only be a weekly run, mostly for tourists.