Some scholars believe the account of Moses in Exod 2:1-10 is indebted to the legend of Sargon. I think that's been debunked by scholars like Duane Garrett, Victor Hamilon, James Hoffmeier, and Alan Millard.
Conversely, some scholars believe it's indebted to the myth Horus. I find the alleged parallels to be strained. But even if there were intentional parallels, that doesn't mean the account is unhistorical.
The same issue crops up in reference to the Exodus-typology in Mt 2-4. Although he's liberal, Dale Allison offers a useful corrective to the glib assumption that parallels automatically undermine historicity:
In your writings, especially in your commentary on the gospel of Matthew, you have demonstrated that the gospels—again, mostly Matthew—make much use of Old Testament narratives to illustrate the story of Jesus. Some mythicist scholars have claimed that such use of OT themes instead lends credence to the view that most of Jesus’ life, as presented in the gospels, was completely fabricated as a sort of midrashim based on the OT. What is your opinion regarding the plausibility of such a thesis?I understand the reasoning, which is at the heart of Strauss' great book on Jesus, wherein he argues again and again from typology to fiction. I agree with him about some things. But not everything. We should be careful here. People can engage in typological interpretations of themselves. Martin Luther King, Jr., presented himself sometimes as akin to Moses, at other times akin to Lincoln. Alexander the Great thought of himself as being like Achilles. Julius Caesar thought of himself as being like Alexander. Napoleon thought of himself as being like Caesar. General Santa Anna thought of himself as being like Napoleon. Obama went to his first inauguration by train and created parallels between himself and Lincoln. Eusebius, when recounting Constantine's victory over Maxentius at the battle of the Milvian bridge, cast the latter in the role of Pharaoh, the former in the role of Moses, which does not mean they fought no such battle. John Bunyan, writing of his own conversion, drew heavily upon the New Testament accounts of Paul becoming a Christian, which scarcely entails that Bunyan's recollections are free of facts. Paul himself seems to have seen himself in Jeremiah and Deutero-Isaiah. One could go on and on. Sometimes typologies grow out of autobiographical interpretation. This is my view about Jesus and the NT Moses typologies: he probably thought of himself as the prophet like Moses, an idea that the tradition then developed. In any case, you can tell a story in multiple languages, and Scripture is a sort of language. In fact, I doubt that some of the early Christian leaders could have said much of anything without borrowing scriptural language.
One also should beware of assuming that people can't have large self-conceptions. History is full of human beings who have aspired to greatness, who have sought to lead others, and who have imagined themselves to be at the center of what they believed the gods or God were doing. That the NT gives Jesus roles and titles from the OT doesn't logically entail that all those roles and titles were foreign to his own thought.