Bamidbar / Numbers 27:16 · Drash
יִפְקֹד יְהוָה אֱלֹהֵי הָרוּחֹת לְכָל־בָּשָׂר אִישׁ עַל־הָעֵדָה׃
"Let the Eternal, the God of the spirits of all flesh, appoint a man over the congregation,
Drash דְּרָשׁ
Faces not alike
In a crowd there are no two faces alike, and no two minds alike. The midrash begins with blessings over unusual people and arrives at the last request of Moshe (Moses).
Tanchuma: as people's faces are not alike, so their minds are not alike. Therefore there are special blessings on seeing different people and on seeing a great crowd. And therefore Moshe, before his death, asked for a leader who would bear with each one according to his mind.
How Midrash Tanchuma explain it
Midrash Tanchuma And Moshe spoke: Let the Eternal appoint
Let our teacher teach us: one who sees people of unusual appearance, what blessing does he say? So our teachers taught: one who sees a black man, a very white man, a very tall man, a man with spots on his skin or with a swollen body, says: "Blessed is He who varies the creatures." And one who sees a man without a hand or a foot, a blind man or one covered with boils, says: "Blessed is the true Judge." When? If they were whole and were changed. But if they were so from their mother's womb, he says: "Blessed is He who varies His creatures." And one who sees beautiful people and beautiful trees says: "Blessed is He who has such in His world." But if he saw great crowds of people, he says: "Blessed is the Knower of secrets."
Just as their faces are not like one another, so their minds are not like one another, but each one has a mind of his own. And so it says: "When He gave the wind its weight and measured out the waters" (Iyov / Job 28:25): every creature has a mind of its own.
Know that it is so: Moshe (Moses) asks of the Holy One, blessed is He, at the hour of his death, and says before Him: "Master of the world, revealed and known before You is the mind of each one, and among Your children no two are alike. When I part from them, I beg You: if You wish to appoint a leader over them, appoint over them a man who will bear with each one according to his mind." From where is this? From what is read in this section, as it is said: "Let the Eternal, the God of the spirits of all flesh, appoint a man over the congregation."
Takeaway
The Talmud also brings these blessings (Berakhot 58a–b). "The Knower of secrets" is said on seeing a crowd because He knows what is in the heart of each one.
Iyov / Job 28:25 says "wind" (רוּחַ). In Hebrew it is the same word as "spirit", so the midrash reads the verse as a measure given to each spirit.
Moshe asks for a leader "of the spirits of all flesh" (לְכָל־בָּשָׂר): not for one kind of people, but for all.