No one here is suggesting that the Soviet Union has a good track record on pollution. People are suggesting that capitalism doesn’t. “Capitalism is the problem” does not imply that the Soviet Union is the solution.
When people say “capitalism is the problem,” they’re often looking towards an ideal — which sometimes exists and sometimes doesn’t — of a better world. That’s not a bad thing. Practically no one would suggest that an authoritarian flavor of communism (ala USSR) is that ideal.