tbh just get a Steam Deck and emulate it all, because fuck Nintendo and fuck scalper prices for old games.
This is a fun question.
For Pokemon specifically, the 3DS easily wins this - there isn't a single core Pokemon game on the Switch worth playing. That probably isn't going to change anytime soon unless ports happen, because Game Freak become more inept with each passing generation. If you only want a machine to play Pokemon games, then the 3DS will be your best bet for this, as you can access seven generations of mothership titles and numerous spinoffs. Literally all you're missing is the original third generation titles, and whilst Emerald is better than ORAS, you can get by with ORAS. For spinoffs, the Switch has New Pokemon Snap - which, whilst high quality, is very minimalistic and not for everyone - and a crappy remake of the original Mystery Dungeon which completely misses the point of what made that game so great. Oh, and a rubbish pay-to-win MOBA game. Because who doesn't want that, right?
In terms of the quality of the hardware and in-built software the 3DS comes out on top, without question. The Switch is plagued with issues, the most prominent of these being Joycon drift, although even if you don't get drift the construction of Joycons leaves a lot to be desired, with no D-Pad unless you get a Lite (which would mean if you get drift you'd have to send your entire console in for repairs!) and the springs inside the joysticks being prone to coming loose and making clicking sounds every time you move them. They're also undersized - which is occasionally frustrating for longer play sessions and certain titles - and they're not really all that comfortable in your hand either. Then there is the Switch itself - if you're getting an original model, then tabletop play is undesirable thanks to the awful stand it comes with. It has an extremely unattractive bezel around the screen. The UI is a complete fucking mess and easily the worst of any console, ever. I'm not even kidding. The 3DS lets you organise your games into folders, gives you themes to choose from complete with changing system music, and it has a comprehensive activity log. The Switch has none of this. Nintendo Switch Online remains the worst of the three online services despite being the cheapest, too. The Switch is objectively worse when it comes to hardware and software. It's appalling. The ONLY advantage the Switch has here - assuming you don't buy a Lite - is that you can play the games on a TV screen as well as on the Switch screen. That's it. The Switch feels like a bootleg console, both in its build quality and in its software.
If you're looking to save money, then you need to jump on a 3DS and the games you want quickly. Like, right now. The problem with the 3DS is the pricing, which has been artificially inflated by scalpers, and it's only going to get worse with time. Pokemon is actually the worst hit of this - if you can find a genuine copy of HeartGold/SoulSilver especially for under £60, then you probably need to look at it again. A lot of DS and 3DS titles are VERY expensive now. Moreso than Switch titles, which are already overpriced as it is given the quality of what is on offer. Nintendo think it's acceptable to charge full price for glorified ports (it isn't) and their games never drop in value, so the "wait for a sale" attitude will have the opposite effect a lot of the time: the games just go up in price because of scarcity and greedy bastards online. There's always digital purchasing to offset physical copy prices, but...well, I'd assume you want to own what you buy. Digital games are licenses, not actual products, and they're good only for as long as Nintendo decide to keep the online servers for that system up and running. Which will be a long time, but it's not permanent.
The library is where it becomes a bit more difficult to gauge, because it really does depend on what you like. The Switch probably has the wider variety of games and it's only going to increase as time goes by, but in terms of the quality of those titles? Well...it depends. The 3DS has Etrian Odyssey, and nothing on the Switch can match that for DRPGs...well, unless we get Demon Gaze Extra over here, which we probably will, but that's one game against an entire series. The Switch doesn't have a single good Zelda or Pokemon game. It has the Link's Awakening remake, but that isn't as good as the original version frankly. It also has Hyrule Warriors, but so does the 3DS. For games, you need to decide on how important visuals are, and what you want to play. Obviously if you care about visuals at all you want a Switch. Personally...well, I have about 60 3DS games. I have over 300 Switch games. But more than a few of those are double/triple dips because I prefer playing games handheld.
Switch has a lot of games available on other platforms, so if you don't have another system that immediately makes it more appealing. But if you have another console that immediately robs it of a lot of its appeal when compared to the 3DS - the Switch Tax is a thing, and it's horrendous. Doom on PS4 is about £10, Doom on Switch is about £40. Witcher 3 on PS4 is £15, Witcher 3 on Switch is £45. Switch ports also leave a lot to be desired sometimes, and unless you're VERY big on playing a game in handheld mode, the Switch version of a game is the worst choice most of the time because of the performance. It's noticeable when you put the games side-by-side. I say this as someone who can't tell the difference between 60FPS and 30FPS and who doesn't care. Switch ports ONLY have the handheld play going for them.
So comparing the Switch exclusive titles to the 3DS exclusive titles, it's really not as clear cut. Nintendo games don't drop in price because they have a very high standard of quality assurance. So the 3DS games still hold up very well, and it really brings the Switch games down because you're paying more money for basically what is exactly the same experience. Because if you've played one Mario game, you've played them all. A lot of Nintendo's 3DS titles are in the Nintendo Selects range, and their Switch games are full price. Massive price disparity, minimal quality difference. Doesn't take a geniue to figure out which would be your best bet here. What makes it harder to judge in terms of exclusives would be third party titles...and the 3DS has the DS' library to call upon as well here. It could win this by sheer volume alone, at least for the moment. It's...difficult to say, honestly. At least for me. Because a lot of the games I play on Switch I've played on other systems; it's not really an exclusives sort of system for me, because I am very bored with Nintendo games at this point.
Overall, for the moment, I'd actually say the 3DS would be the better choice, if we ignore that the Switch is halfway through its life cycle and will inevitably have a bigger and more diverse library by the end of it. You can buy the majority of those games on other systems, and they'll be cheaper and will perform better. Handheld play carries the Switch a VERY long way for me, but really that is all the Switch has going for it over its competitiors. But it's a very poorly-built system, and it isn't going to improve - sure, we've got the Switch OLED coming which makes tabletop play a viable option and has a substantially better screen - seriously, OLED is MUCH better than LCD and it DOES make a difference in visual quality - but that doesn't address the Joycon issues, or the UI problems. Which are both MAJOR issues that Nintendo seem determined to ignore. Those aren't going to be addressed. Let's be real. The 3DS, by comparison, is of a much higher quality. On a like-for-like basis it has better first-party games, easily. Third-party it's not as clear cut, but there are still some amazing third-party games on the 3DS well worth experiencing. It's a fantastic machine and well worth the purchase even now.