What you're describing is a Warlock
A Warlock has a very limited number of spell slots, but gets access to spells all the way to 9th level. They have a bit of a different mechanic where they recover slots after a short rest and can cast them all at their highest level (max 5th), but otherwise they do what you want.
TL;DR: It depends on what their other half is.
Warlocks work because while they have powerful (but limited) magic, their non-magic half is generally weak. A Warlock determines what they want their other half to be when they pick a Pact Boon, either Blade (melee combat), Tome (slotless spellcasting) or Chain (RP). Even a Hexblade, Blade pact Warlock will be weaker in a straight up melee fight than a paladin.
Paladins and Rangers work the opposite way, their weaker magic half augments their stronger martial half. Taking a Paladin who can fight almost as well as a dedicated Fighter and giving them 9th level spells that they can just end encounters with won't be balanced. Why be a Cleric when the Paladin can do all the cool stuff you can, and then hit people afterwards too?
If you were to reduce the Paladin's martial ability to compensate for the increased power of their spells (and replace smite with something better, since they won't have enough slots to effectively use it), then you could probably make something that could be balanced and fun. But at that point, why not just make a Warlock and flavour him to be kinda-paladiny?
My understanding of the design behind 5e was that they specifically avoided these kinds of class designs. A class with high-level spells but few overall spell slots would be very powerful once or twice a day and very weak otherwise, which would make it unfun for other characters (when this class is single spelledly ending encounters) and then unfun for the PC (when this class can't do anything but cast cantrips the rest of the day).
The Warlock gets around this by having strong cantrips (augmented by Invocations) and recovering their lower level slots after a short rest, meaning they get 1 or 2 moments to really shine but those moments have to coincide with their extremely limited selection of spells known and can still contribute after their Mystic Arcanum are expended.