Considering that the alternative to the Compromise of 1877 was a President who also would have ended Reconstruction and how hard Hayes fought against the Chinese Exclusion Act, easily Hayes.
Hayes ended (what was left of) Reconstruction anyway with his Corrupt Bargain, and based on what he said during the campaign, likely would have even without it. Democrats were generally more pro-immigrant overall than Republicans at the time too (one of their few significant differences), and (unlike Hayes, clearly) Tilden was solidly anti-corruption.
1876 was the first of two US presidential elections to be outright, shamelessly stolen (along with 2000, although there is at least some room for debate there; they barely even tried to hide it with this one). That undermines our entire democracy and I will never view Hayes as even a legitimate president at all, so he’s automatically one of the worst as far as I’m concerned. Even if Tilden would have been awful, and again I’m not convinced he would have been worse than Hayes at all, the fact that he “lost” despite winning an absolute majority of the vote and obviously winning the key states needed to secure his victory makes the 1876 election a shameful black mark on our history.
Republicans threw black people under the bus once and for all with the way they did it as well, leaving them without a party even trying to represent them or fight for them for decades. Deplorable. At least no one was expecting the “Dixiecrats” to be any good on Civil Rights, but the “Party of Lincoln” abandoned their principles barely a decade after he died. That’s why I actually mark this as the key turning point when the GOP became the bad guys, far earlier than most seem to.
The USA invading Mexico was no different morally speaking than Russia invading Ukriane, so unless you think Russia invading Ukraine wasn’t all that bad…
That is extremely debatable at best, and I would argue downright offensive to say given what’s going on in Ukraine right now.