Flamestrike
Legend
I would definitely avoid any ranger subclass that makes regular use of the bonus action. So probably go for Hunter, Gloomstalker, and Fey Wanderer. Avoid Horizon Walker like the plague.
Beware that (if your table is stringent about such things) going with both hands full means you have no way to perform the somatic components of spells without Warcaster and you have no way of fulfilling the material component without dropping your weapon. Not a lot of the melee combat oriented Ranger spells involve material components, but on the somatic side you will probably want to do the occasional cure wounds or absorb elements.
Ameliorated in Tashas thanks to Rangers now being able to use a Druidic Focus as their spellcasting focus, which a Staff is.
So a Staff + Shield wielding Ranger, can cast both S+M and M spells with both hands full. Basically all spells are fair game unless they have an S component and lack a M component.
Another advantage (also thanks to Tashas) is you can dump Str and Dex with this build and take Shillelagh cantrip at 2nd (d8 damage, and Wisdom to hit and damage).