The DS has the PSP beat in terms of side-scrollers.
Hands down.
No contest.
Case-closed.
Next customer, please.
As for RPGs, it's a matter of tastes. Most of the best RPGs in the PSP library are ports, like Final Fantasy Tactics, Disgaea, Tactics Ogre, Star Ocean, Lunar, Persona, and Tales of Eternia. Aside from that, there's really only Monster Hunter, FF7: Crisis Core, KH: BBS, and Jeanne D'arc. Phantasy Star Portable games if you consider those RPGs. It gets a little scant. You can, however, buy a few PSX games on the online store, so that can alleviate the problem somewhat.
The DS, on the other hand, not only has the entirety of the GBA library at its disposal, with games like Golden Sun, Fire Emblem, Megaman Battle Network, and Castlevania: Aria of Sorrow, but it has a very strong primary library as well. It has some ports, like Chrono Trigger, and some remakes, like the Final Fantasy games or Dragon Quest, but it also has a lot of original titles, like Mario & Luigi: Inside Story, Radiant Historia, Golden Sun: Dark Dawn, Final Fantasy Tactics 2, Etrian Odyssey, Luminous Arc, and The World Ends With You. There's a ton more, but those are the highlights