It is one thing for a state to decide to do something stupid like this, but quite another to make an interstate pact to vote as a block.
As if the elections had no effect? This cannot be constitutional.
Seems to me that the voters who voted in the majority for Candidate A in State X, only to have State X cast its electoral votes for Candidate B, would have clear reason to request redress under "equal protection under the law".