We're talking about the intrinsic merit of each respective composer. We shouldn't consider non-musical issues (such as constraints imposed by the Russian regime). If we considered Beethoven's deafness, for example, he would decisively be deemed the greatest composer, primarily by virtue of his overcoming his handicap.
I see your point, but I think that seeing how a composer overcomes trials with his music adds to the greatness of that composer.
I do put Beethoven very high on the list of great composers not only because of his beautiful music, but also because he was deaf.
All of that aside though if you want my opinion on strictly music here goes.
Shostakovich spanks prokofiev when coming to symphonic works. I believe Shosty's 15 symphonies can compare in greatness to Beethoven's (doesn't beat Beethoven but worthy of mention in the same sentence)
I think Prokofiev beats Shostakovich when it comes to PC's. Though I think that Shosty's 2nd mvt to his 2nd concerto is one of the most beautiful movements it isn't enough in itself to beat Prokofiev.
On the solo piano part, I am torn. Not since Bach has someone written such a great collection of works as Shosty's P&F. That are absolutely phenomenal. Prokofiev on the other hand wrote great sonatas and the such. So I won't pick who is better.
Opera and ballet is another place that I am torn with. I love the operas from both men.
That is my opinion for now, but I reserve the right to change it if I so please down the road.

LOL