As a sweepstake (essentially a free-to-enter lottery), it is legal.
If it would be a reward to register as a voter, it would be illegal.
The sweepstake is explicitly exclusively for registered voters in certain battleground states.
I've not checked what the deadline for registration is in all the relevant states. For Pennsylvania, one of those states, today is the last day to register as a voter.