The problem is you said "handheld" which rules out all official options. I'd probably look into
http://www.gpdxd.com/ devices but I have no idea how well they run N64 games and you can probably forget about gamecube games. Also keep in mind that going this route means running opensource emulators and running ROMs... something that isn't exactly legal but everyone does it anyway.
There's also the official route... a Nintendo Switch and subscribing to their online service. However, you'll only get access to a small portion of the NES library right now. I'm sure they'll eventually expand it to include SNES/N64 games but who knows how long that will take.
You have a lot more options if you're willing to forgo the handheld requirement. NES/SNES classics are the official and legal options but you're limited to those systems unless you're willing to go through the process of getting other emulators to run on them. It's very easy to load additional games onto those things (again... not exactly legal) and a little more involved to load other emulators. I have no idea how well N64 emulators run on them but others have done it. You can still probably forget about gamecube games. This is my preferred option since I mainly only care about NES/SNES. If/when Nintendo adds N64+ games to the Switch, I'll probably start going that route since I have one.
Another popular non-handheld option is a Raspberry Pi running
RetroPi. This once again takes you down the 'not quite legal' route but you can pretty much play any console game you want up to around the N64 era... assuming you can find the ROMs and Nintendo's cracking down on ROM sites. You can also get adapters and use the official controllers if you want.
If you really want to play GameCube games, the best option is to buy a real GameCube or an older Wii that supports them and just play the real things.