But doesn’t the DNC have to make sure that the candidate they pick is legally qualified to hold that office?
If they want him to actually hold that office, sure. But that is an internal DNC process on how they do that. It isn't up to the Federal Judiciary.
If the Dems don't chose wisely, then their guy isn't qualified and doesn't get in, and the man who is qualified and has the most electoral votes gets in.