I can't think of any time I've seen that, off-hand. But then, I'd like to see it where the villain really is working for everyone's benefit and the good guys were wrong about him being evil.
How exactly would that work? Just about every decision or advance hinders someone. Or are you talking about solutions where a short-term inconvenience leads to a larger, long-term benefit? How about an antagonist trying to get something vital, pushed to aggression by a stubborn "good" people?
For example, Cameron's upcoming film Avatar seems to recycle the old "advanced conquering force drives off the natives to harvest the region's resources" plot. Guess who we're supposed to root against? So cut and dry; it probably won't even mention -what- makes the resources so valuable; any commodity people are willing to kill for has to improve their lives somehow.
Instead, what if the resource was a plant that only grew there and was considered sacred by the natives? The plant could be the cure to a plague ravaging the invaders' people, but the natives refused to trade because it was sacred. Would you call the invaders evil for taking the plant by force instead of letting thousands of their people die?
I was mostly talking about a situation where the protagonists think the villain is working against them when, in fact, they and the villain are working for the same goal. A fantasy world where palace intrigue is the norm could pit people against each other who would work for a common goal if there wasn't inherited political distrust.
And I think the picture you talk about it is far too simplistic, especially since the real-world equivalents of that plot have usually involved Western nations taking resources only for themselves, from regions that don't have the same economic or political power, and despoiling the environment in return. How fast is this plague? If it's so all-consuming and deadly that this plant is their only cure instead of something closer to home, how can the invading nation afford the time and resources to send out the invasion force in the first place? (People tend to have different properties in a time of plague, and/or it's likely that the members of the expedition force would already harbor the plague- meaning they would spread it to the country they were exploiting). Why should their people be the ones to survive and others in other nations die? Do they intend to share this cure or not?