Numbers 27:17
15 Then Moses spoke to the Lord: 16 “Let the Lord, the God of the spirits of all humankind, appoint a man over the community, 17 who will go out before them, and who will come in before them, and who will lead them out, and who will bring them in, so that the community of the Lord may not be like sheep that have no shepherd.” 18 The Lord replied to Moses, “Take Joshua son of Nun, a man in whom is the Spirit, and lay your hand on him; 19 set him before Eleazar the priest and before the whole community, and commission him publicly.
Matthew 9:36
34 But the Pharisees said, “By the ruler of demons he casts out demons!” 35 Then Jesus went throughout all the towns and villages, teaching in their synagogues, preaching the good news of the kingdom, and healing every kind of disease and sickness. 36 When he saw the crowds, he had compassion on them because they were bewildered and helpless, like sheep without a shepherd. 37 Then he said to his disciples, “The harvest is plentiful, but the workers are few. 38 Therefore ask the Lord of the harvest to send out workers into his harvest-ready fields.”
Notes and References
"... it seems likely that Matthew has alluded to the Davidic expectation of Ezekiel 34, given the explicit statements about Jesus as the Messiah (1:1), the Davidic son (1:1; 18–25) and the shepherd of Israel (2:6). J. A. Overman is right to assert that the Davidic apologetic begun in the Vorgeschichte (chapters 1–2) of the Gospel is carried through and shades the meaning of the phrase here so that the phrase conjures up in the mind of readers the Davidic Shepherd-King solution to the problem of bad shepherds ... While Matthew evokes Ezekiel 34 with his use of the phrase, the links with Numbers and 1 Kings/1 Chronicles cannot be excluded either. This is especially so in view of the verbal parallel with Numbers 27:17 noted earlier. The intertextual associations that connect the figures of David, Joshua and Moses make the trajectory of the whole biblical tradition relevant to Matthew’s use of the phrase ..."
Willitts, Joel Matthew’s Messianic Shepherd-King: In Search of "the Lost Sheep of the House of Israel" (p. 124) De Gruyter, 2007