The limitations of the "qualifications" power of the House were established in the Adam Clayton Powell case. To my knowledge, there has been no such court ruling on the power to judge elections. Presumably, if acting as "judge," the Senate would need some rationale for its decision; it lacks the power to appoint Senators, but if there are two plausible vote counts, the Senate can choose either.
The Constitution itself says quite plainly that the times, places and manners of selecting United States Senators shall be prescribed in each state by the legislatures rhereof. The amendment changed it to a popular election but how each senator is elected as to time place and manner of the popular election was not changed.
See the successful cert petition and remand in Hopfmann v. Connnolly about Kennedy’s 1982 primary election.