If the Constitution's requirements have not been met, then yes. Judges do that all the time. At all levels. See Bush vs. Gore in Florida.
---------------------------------
Since we are (or, supposed to be) a Constitutional republic and NOT a "democracy", yes. It's thanks to this republic that "minorities" (of any kind) have a voice and have protections under the Constitution.
If the masses (i.e. majority) vote someone into office that isn't Constitutionally eligible, then they should be found ineligibly by the judiciary. From there, how they are removed (if they don't leave on their own free will) is up to law enforcement.
“If the masses (i.e. majority) vote someone into office that isn’t Constitutionally eligible, then they should be found ineligibly by the judiciary.”
Incorrect. Congress is responsible, not the judiciary.