Let us see in the Targum below (how he adds the fact that Moses changed his name due to Joshuahs high level of humility)
These are the names of the men whom Mosheh sent to explore the land; and when Mosheh saw his humility, he called Hoshea bar Nun Jehoshua.
And Rashi comes to teach us that he changed his name to protect him from the advise of the spies -
A suggestion of why Moshe reasoned the need to try and protect Joshua, specifically after noticing how humble of a man he was is the following. Let us first contemplate, if Moses already knew that the spies would come back with slander regarding the land, and he knew that Joshua is righteous in his ways, therefor he had to pray for him not to fall into the trap of the thought process of the spies. If so, now after the story we see that Caleb was also together with Joshua as the two people who did not fall into the trap of the spies, so to just like Moses prayed for Joshua, he should have also prayed for Caleb, so why did he only pray for Joshua to be spared, when both of them ended up getting spared?
Let us say and preface with a verse that comes later on -
(22) They went up into the Negeb and came to Hebron, where lived Ahiman, Sheshai, and Talmai, the Anakites.—Now Hebron was founded seven years before Zoan of Egypt.—
And on this verse, when it says they came to Hebron, Rashi writes the following -
ויבא עד חברון [AND THEY WENT UP BY THE SOUTH] AND HE CAME UNTO HEBRON — Caleb alone went there and prostrated himself on the graves of the Patriarchs, offering prayer that he might be helped not to give way to the enticement of his colleagues and join them in their counsel...
Based on the above we can see that Moses knew with the Holy Spirit that the merit of Caleb will protect himself, through the fact that he visited the graves of his ancestors in Hebron, and poured out his heart with supplication to be saved from the spies and their planning, therefor there was no need for Moses to pray for him.
Yet we still have a question. If Calebs prayers by his ancestors were enough to protect him, then why did Joshua need the prayers of Moses to keep him safe, couldn't he just do like Caleb did and pray in Hebron, and subsequently be saved like Caleb?
And we can say an answer by starting with the words of the Holy Rabbi, Rebbe Dov Ber of Lubavitch, may he be remembered for eternal life, and these are his words -
"When one is going to the graves of the righteous and holy, one can come to great embarrassment and total self negation through his embarrassment from all of his actions and thoughts that he has thought of and done until today - since they are all revealed, because the righteous, even when they are alive they know the thoughts and tribulations of man, even more so, the soul of the righteous knows this after his passing."
If this is so, Moses was suspect that Joshua wouldn't go to suplicate and prayer by the graves of his ancestors due to his extreme humility, that Joshua would not see himself as worthy of his prayers working. So Moses thought he would not have the same merit of protection that Caleb would have, therefor he felt it necessary to pray for Joshua.
And this is why the above Targum came to teach us specifically why Moses prayed for Joshua and not for Caleb, and this is what it was saying - Once Moses saw the humility of Joshua, he was worried for him specifically due to his humility that he would not pray for himself at the graves of his ancestors in Hebron, so Moses had to pray for him.