I think Heinlein might have been right. In Starship Troopers, voting is earned.
To earn that right, you have to complete a minimum of two years federal service. Federal service jobs are at best demanding (Navy, Mobile Infantry, inter-stellar mining work) and at worse extremely life threatening (being a guinea pig for new drugs and equipment). By completing a two year term, you have proven you are willing to risk your life to vote and that you have the capacity to put the interests of others above yourself.
EVERYONE can join the federal service as long as you're mentally capable of understanding the oath. Non-voting legal residents enjoy every single right as citizens except voting.
I can't think of a better way to determine "worthiness" of voting. And if we aren't going to do this, at least ban homeless people and dependents from voting. If you're not working then you're not contributing and thus you don't get to have a say. EVERYTHING ELSE in life works this way.