This line confuses me a bit: "The creature is limited in the actions it can perform by the nature of its new form, and it can't speak, cast spells, or take any other action that requires hands or speech unless its new form is capable of such actions."Absolutely, the paladin is still a paladin. Otherwise, you could break your oaths every which way while polymorphed, but be treated as not having broken them. Whatever happens in dragon form stays in dragon form? That doesn't work for me.
However, as per the rules of true polymorph, you can only use the new form's abilities. So, no smiting as a dragon.
In the case of regular polymorph, it says that you can only use abilities that your new form would allow. So whether or not you can Giant Ape smite depends on the DM's ruling. I'd allow it though.
Is this saying that you keep spellcasting if True Polymorph is used on you, but your form might make it impossible to cast spells, or is this saying that if polymorphed into a spellcasting creature you gain spellcasting?