Yes, it is possible to achieve this, here's an example.
The best way to avoid that is to create someone with strong traits that either make him loved or hated by the audience without trying to push them one way or another; one example of this is Aaron Burr or Alexander Hamilton in the play Hamilton. One may see one as a good person and the other as bad for what they did, and this is brilliant writing on the part of Lin-Manuel Miranda. By managing to write the play in a specific way, he let the audience decide the morality of the characters. Even then, though, the people still do decide on a morality in their own minds. Before the play was written, more people disliked Burr than Hamilton, simply because they only saw Burr as a murderer at that very moment, and were not entirely aware of all of the proceedings. (The play did embellish Aaron Burr a little bit more than his real life counterpart, but this is about the writing, not real life.) In the play Aaron Burr is portrayed as someone that takes his time, and is shown to be more than just the killer of Alexander Hamilton. He has very strong traits, strong emotions, and strong interactions with other characters. He is shown to have flaws, such as loving a woman who is married to a British officer and possibly swaying with the political winds as they change. Hamilton is not shown as just some brilliant man that helped to strengthen America's economy. He is shown as a man with faults, such as cheating on his wife, and being impatient, fiery, and prideful. These traits give them faults, and thus keep them from being morally perfect. To offset this, both have strong love for their children and both have tragic stories to garner sympathy (Burr was born pretty well off but his parents died and so did his wife, Hamilton was born in squalor, his parents, son, friend, and many others died). They also have little traits that make them likeable.
In one of the last scene's the duel between Hamilton and Burr, it's not seen as an act of aggression by either one, but as something that could have been defused by either but wasn't purely based on principle. As the duel is about to commence Burr states that "this man will not make an orphan of my daughter", giving him possible justification to not let Hamilton shoot him. There's a scene where, as the bullet travels to Hamilton, he reflects on his life, making people feel emotions for him as well, and finally, at the end, Hamilton refuses to shoot and raises his gun at the sky, sealing his fate. In Burr's final lines of the play he seems to have regret, but whether he actually does is still debatable, as his lines are vague.
By showing both Burr and Hamilton as flawed but loveable characters that are not morally superior to the other. Personally I think Hamilton was the better of the two, but I know most of my friends disagree with me, pointing out his infidelity.
I know this was long, but the overall point was to agree with what Niccolo Edwards said. It is possible to create two (or more) sides that are not inherently morally superior. However, they need to have strong traits, otherwise they will simply be bland. While the writer maybe ought not to create a side that is morally above the others (sometimes it is necessary for story-telling), they do need to create multiple sides to which the readers can latch onto.
Sorry for the text block, I sort of got carried away.
(Edit: I should talk about cases where moral superiority can be necessary.
There can be multiple reasons for moral superiority in writing, the biggest of these I have seen is justification One instance used by Miranda in Hamilton is when King George III is shown as an almost misogynistic boyfriend of America in his songs. He makes the audience hate his stance and his attitude(his character is hilarious), thus giving justification for the American Revolution. It is used in the song "Stay Alive", where Charles Lee is portrayed as a bumbling fool of a general and publicly denounces General Washington who is shown as pretty morally upright. His denunciation of Washington, which is meant to upset the audience, gives justification for John Laurens to duel Charles Lee. At no point does the majority of the audience want Charles Lee to win the duel, and this is due to making him morally inferior to Washington and the others.
If a writer needs to create justification for something, moral inferiority is one of the best ways to do it. Why hate the KKK? They're racist bigots that don't tolerate anything but heterosexual, Protestant Anglo-Saxons. If we didn't already know about the KKK and it wasn't shown that they are bigots, then there would be no reason to hate them, and no reason to try and eliminate them. This can be used in more subtle ways to get a specific character to be disliked instead of just branding them "RACIST" or something of the sort. Anyways, there are cases where polarizing morals is good for writing a story.)