Talk to the players
Others have said it, but this can't be over emphasized. Most traditional RPGs are collaborative affairs and the GM cannot be responsible for making everyone happy. So talk to them plainly and see what they want. They may be highly supportive of ending this campaign and starting a new one or of working with you to change the direction of the game or any number of other options that you can all partake in as a team.
Railroading is not an either/or
You mention that you hate railroading, which I totally understand. But realize that most campaigns will not be and should not be "railroading or open world". It is much more of a spectrum of "some railroading and some open world, but with varying amounts". And the amount can vary not just between games but within one campaign. It may be helpful to railroad fairly heavily at the beginning of a campaign as you get the world established, get the characters fully established and grounded, and get some of the potential plots established. Then you can ease up and move more open world when all of the characters have motivations well established and plot hooks sunk deep.
Evil can mean a lot of things
You said that most of the characters ended up evil, but that can mean a lot of things. An evil character that just wants to make the world burn (probably) isn't well developed or interesting as anything but an excuse for Hero to get into fights.
However, an evil character with a backstory for why they are evil and a specific motivation can be very interesting, sympathetic, and even hold onto a code of honor while definitely being evil. Shylock is (often, there are multiple interpetations) portrayed as evil and greedy, but also in a sympathetic and relatable way and gets one of the most eloquent speeches Shakespeare ever wrote. Strahd in Vampire of Mists is unflinchingly evil, but his fall to evil was relatable and sympathetic and even when it was complete he held to code of honor similar to chivalry.
In short, it is possible that your loathing for these evil characters will fade somewhat if you work with the players to make sure they have well developed evil characters that have a strong motivation and some (preferably sympathetic) explanation for why they are evil.
Also, if evil to them just means "greedy" but not in a "watch the world burn" sort of way...well that isn't all that different from the way most good characters act in many rpgs. It just means that you need to shift plot hooks from things like "Help us, the orcs are attacking" to "Help us, the orcs are attacking and we can reward our rescuers handsomely".
Edit: an example
I closed this out, but then thought an example might help. A character whose motivation is "I want to plunder and kill" is evil, but boring. I wouldn't enjoy gming for that.
But lets say we have a character that starts out with "As a child of 6 I watched the Medici's stab my father, the rightful king of Alonion, dishonor my mother, and throw my older brother out of a window. They destroyed my family and stole my throne. I survived only because my nursemaid grabbed me and ran and then gave me to farmers to raise." Now we have something of a background and plot hooks. But its not necessarily evil, many good characters in fantasy have a somewhat similar background story.
So we add, "The Medici's that did this are now dead or old and retired. It is their son, who is my own age and didn't participate in the slaughter, that now sits on my throne. He leads the people well and does his best to rule fairly. Yet the throne is mine by rights and I will still seek to regain it." Now we are probably into evil territory, and we can talk about how evil and lawful v. chaotic based on how he intends to go about it and what he is willing to do or not do. But even if we go deep into evil, there is a reason for it and it is interesting with a very sympathetic justification.
But now we need to explain why he is off adventuring instead of trying to raise rebels (unless you want the game to be about him trying to raise rebels right off the bat.) So we add, "I know that I have little hope of regaining my throne without vast sums of money, personal experience, and a reputation for power and leadership. Thus, I set off now to make a name and a fortune. My sights remain firmly on my kingdom and I will do whatever it takes to gain the money I need to finance my war, but for now I work elsewhere and prepare..."
Now, we have a sympathetic reason he is evil, have established that he is willing to use at least some evil means to achieve his ends which are arguably evil, have plot hooks that could be used later, but also have a reason he is running around with first level adventurers doing more or less standard first level things.
Personally, I would be happy to gm for that character. If my players wanted to play evil characters I might try to help guide them to a story like that and the motivations that come with it.