Failure is an option
Think of the the quote, "Failure is not an option." We tend to think of failure as the worst possible outcome. But I think that we find here and in another episode covered by the Midrash that sometimes failure is the only possible option from a moral and realistic point of view. Even though they did not succeed in convincing the people, Yeshoshua and Caleb still get full credit for not being swayed themselves. They did not say, "If you can't lick 'em, join 'em." They maintained that they were right and the others were wrong. Theirs was not the type of innocent idealism conveyed to children that the good will always triumph and defeat evil. Clearly, they were the ones being defeated in the eyes of the public. Practically speaking, they were failures. But they still took the option to fail because they knew that being right does not depend on who beileves you but one what one knows to be true.
I saw in this a parallel to the Midrash on Pharoah's 3 advisors -- Bilam, Iyov, and Yithro. It was Bilam who gave Pharoah the idea of slaguhtering the babies. Iyov did not second the motion but remained silent. Yithro protested and so was compelled to leave. So Bilam got punished only down the road in the confrontation with Bnai Yisrael in the desert. Iyov was punished with various afflictions for remaining silent when there was a moral imperative to protest. Yithro got to become pretty important as the father-in-law of the Jews' leader who gave the advice to set up a system of judges. Now, again, Yithro clearly failed because the plot for evil did take place. One would think that Iyov did the only thing possible in such a situation; he did not make a futile protest knowing it would have had not impact. But, in that case, the right thing to take the moral stand, even though it was doomed to fail.
While the Torah directs, "Acharei rabbim lehatos," [incline after the majority -- as is the case of psak and verdicts] it also says not to do so "leraos" [for evil]. The individual is not commanded to subsume him/herself unthinkingly into the larger group, no matter what. The group is to be maintained but only when directed correctly. There are many examples in the chronicles of the neviim that show the prophet exhorting the people even in the face of utter derision and persecution. Even when all his words appeared to be a wast of breath, the navi would still opt to take actions that would fail rather than simply joining in.