You don't have to make it explicit that you're targeting a specific group. If there is a correlation between groups that tend to drive less, and the groups that you don't want to vote, all you have to do is to require a driver license and that imposes an extra burden on the people that you don't want to vote, whereas populations that tend to drive, they already have a driver license and need no farther work to exercise their right to vote. It's so happens that poor people, communities of color, and the elderly tend to drive less.
In Spain everybody has a mandatory ID, and it is very easy and cheap or even free to get it. In that context it makes sense to require an ID. In the US, for cultural reasons, there is a lot of reluctance toward a national ID.