It's hard to say. I think the situation is a lot different than it was with the Wii and DSi shops, as not only is the branding the same for Wii U/3DS as it is on Switch, but assuredly the eShops for those systems run on the same server, as they're connected in multiple ways and funds can be shared between all three under just one account. So my guess is as long as the Switch is around and the eShop for that doesn't close, the Wii U/3DS ones will stick around as well. Not to mention, online play is still available for both consoles, and I think the shops closing would come after those services shut down first. My guess is 2024 or later.
If I'm wrong and they shut them down regardless of what's going on with Switch, I imagine Wii U eShop would shut down first.