Several midrashim deal with Moses' reluctance to turn leadership over to Joshua.

Vayelekh is a prelude to a song.
Moses and the Holy One take turns encouraging Joshua to take heart as he leads his people into the Promised Land. Then Moses gives a final mitzvah to the Priests, Levites and Elders of Israel. They are to hear "this teaching" during Sukkot when all are gathered once every seven years for the Sabbatical year. Then Moses is told it is nearly time to "lie with your fathers."

The Holy One views Moses's immanent demise as a signal for Israel to go astray seeing them as unable to resist the idolatrous ways of her neighbors. He dictates a song that He requires to be on the mouths of the people as a testimony to their wickedness. Moses reiterates these words to the people with a personal imprimatur. "Throughout my life you have been defiant and stiff-necked, how much more so after I'm dead."

The parashah ends and we get to hear the poem next week.

We know that earlier in Deuteronomy that Moses pleaded with the Holy One to pardon him and allow him to enter the land with his people. Moses is rebuked harshly by the Holy One and told in no uncertain terms that the subject is closed. Now, Moses is told that his demise is directly related to the degeneration of his people. The following Midrash when understood in this context not only has Moses pleading for his own life, but maybe much more?

Midrash Tanchuma, Parshat Vaetchanan

The Holy One said: This is the way of the world, each generation has its teachers, each generation has its maintainers, each generation has its leaders. Until now it was your turn to serve, and now it is Joshua, your student's turn. Moses said, "Sovereign of the universe, if it is because of Joshua I must die, I'll go and be his student.”

God said, "If this is what you wish, go ahead and try!" Moses awakened early and hurried to the doorway of Joshua, and Joshua was sitting and teaching. Moses stood stooped over, and placed his hand over his mouth, and Joshua was not aware of his presence and ignored him so that Moses would feel bad and reconcile himself to his fate.

The people of Israel went to Moses' tent but then found Moses at Joshua's tent, with Joshua sitting and Moses standing. They called out, "What is this, that Moses stands while you sit there and teach?" When Joshua tore his eyes away and saw Moses, he tore his clothes, and wailed, crying, "Rebbe, Rebbe, Father, Father, Master!!

The whole of Israel said to Moses, "Moses our Rebbe, teach us Torah. He said to them, "I don't have permission." They said to him, "We will not leave you." A heavenly voice called out, and said, "Learn from Joshua!" So, they accepted the voice and sat and learned from Joshua.

Joshua sat at the head, Moses was on the right and Elazar and Itamar (priestly sons of Aaron) were on the left, and Joshua taught the multitudes in front of Moses.

Rabbi Shmuel Bar Nachmani said in the name of Rabbi Yonatan: When Joshua began with the words, "Blessed be the One who chose the righteous and their teachings..." The tradition of wisdom was removed from Moses and given to Joshua, and Moses no longer understood what Joshua was teaching.

After awhile the whole of Israel arose and said to Moses, "Summarize the teaching for us!" Moses said, "I don't know what to tell you." Moses stumbled and fell, and at that moment, he said, “Until now I have wished for life, and now my soul is offered up to you.”