The 7-2 part of the ruling was correct in that the recount did violate the Equal Protection Clause.
The 5-4 part of the ruling is a tough sell, because the determination of what to do with Florida's electors should have been up to Congress and not SCOTUS.
In SCOTUS' defense though, allowing the election debacle to drag on into January would have further hampered the incoming administration's ability to govern.
False. The Surpreme Court itself admitted the Equal Protection Clause claim was essentially nonsense by saying that their ruling should not be used for precedent purposes.
The state court had already settled the matter and it's usually left up to state courts (if not always with the exception of the Voting Rights Act) to leave election procedures and rulings up to the states.
The only reason for the delay in counting was due to the Brooks Brothers riot that was later determined to be entirely of Republican origin, though I don't know if its known today how high up that went. Several people, like, for instance, Roger Stone who is now an idiot Trump cultist, participated in that event.
Of course, it has been long determined that Jeb Bush through Secretary of State Katherine Harris illegally removed voters from the rolls in a definite violation of their Equal Protection rights, but the Republican Majority Supreme Court somehow didn't seem interested in seeking a remedy for that.