There is a difference between Moshe's intention in sending spies and Yehoshua's intention.
Moshe's intention was to persuade the people and "boost their confidence" so that they should be willing and ready to enter the land without complaint. He wanted spies that would scope the land and its inhabitants and return to tell the people, who would listen to and be influenced by their judgement, that the land was beautiful and the cities were conquerable with the help of God. For this reason, Moshe chose influential members of the community, "ראשי בני ישראל".
Yehoshua was not interested in influencing the public opinion. He was interested in information that would help him make strategic military decisions. He wanted to know the culture and the mindset of the inhabitants of Canaan. He wanted to know how the cities were oriented, their level of defense etc. For this reason, the spies' standing in the community didn't matter. They weren't going to make any public statements; they were going to report back to Yehoshua directly. No need for twelve spies so that all the tribes would listen. Yehoshua was the only one listening.
Why wasn't Moshe interested in military information? (Well, he was to an extent, but only insomuch as it would influence the public to show they could defeat their enemies.) Malbim attributes this to the fact that Moshe led al pi nes; he led the people miraculously. Had he led them into the land, military strategy would have been irrelevant. He was trying to boost people's confidence, their trust in God, to be worthy of His miracles. Yehoshua, on the other hand, led al pi teva, a natural leadership. (Not to say that he could never perform miracles. He surely did.) Military information was necessary for him to succeed. Thus he sent out spies to gather information.