Sargon
There is a pattern in ancient legends of heroes left in a basket in a river, then brought up in a royal family. Around 2500 BC, King Sargon is said to have been placed in a reed basket caulked with pitch and hidden in the river. Sargon was a real, historical person, even if the story of being placed in a reed basket is a myth, and he went on to found a huge new empire based on southern Mesopotamia.
The following translation of the Sargon birth legend comes from J.B. Pritchard's The Ancient Near East, Volume I, pages 85-86:
Sargon, the mighty king, king of Agade, am I.
My mother was a changeling, my father I knew not.
The brother(s) of my father loved the hills.
My city is Azupiranu, which is situated on the banks of the Euphrates.
My changeling mother conceived me, in secret she bore me.
She set me in a basket of rushes, with bitumen she sealed My lid.
She cast me into the river which rose not (over) me,
The river bore me up and carried me to Akki, the drawer of water.
Akki, the drawer of water lifted me out as he dipped his e[w]er.
Akki, the drawer of water, [took me] as his son (and) reared me.
Akki, the drawer of water, appointed me as his gardener,
While I was a gardener, Ishtar granted me (her) love,
And for four and [ ... ] years I exercised kingship,
The black-headed [people] I ruled, I gov[erned];
Mighty [moun]tains with chip-axes of bronze I conquered,
The upper ranges I scaled,
The lower ranges I [trav]ersed,
The sea [lan]ds three times I circled.
Dilmun my [hand] cap[tured],
[To] the great Der I [went up], I [. . . ],
[ . . . ] I altered and [. . .].
Whatever king may come up after me,
[. . .]
Let him r[ule, let him govern] the black-headed
[peo]ple;
[Let him conquer] mighty [mountains] with chip-axe[s
of bronze],
[Let] him scale the upper ranges,
[Let him traverse the lower ranges],
Let him circle the sea [lan]ds three times!
[Dilmun let his hand capture],
Let him go up [to] the great Der and [. . . ]!
[. . .] from my city, Aga[de ... ]
[. . . ] . . . [. . .].
Pattern
Otto Rank (The Myth of the Birth of the Hero) discusses several quite similar hero accounts from around the Mediterranean region and even as far away as India. Of these, the story of Sargon is probably the oldest transmitted hero myth in our possession. On page 13, Rank says the biblical story of the birth of Moses presents the greatest similarity to the Sargon legend, even an almost literal correspondence of individual traits.
Relevance of the parallels
Parallels between the birth stories of Sargon and Moses are little more than an interesting diversion if we know that Moses was a real person who authored the Pentateuch and led the Israelites out of Egypt. It therefore becomes relevant to see what the consensus of scholars is on each of these traditions.
D. M. Murdock (Did Moses Exist?, page 26) says that as long ago as the seventeenth century, the French Catholic priest Richard Simon wrote his Critical History of the Old Testament, in which he reasoned that Moses could not have written the Pentateuch. Murcock cites Richard E. Friedman, who says that there is hardly a Bible scholar in the world actively working on the problem who would claim that the five books of Moses were written by Moses.
Gerard Gertoux (Moses and the Exodus Chronological, Historical and Archaeological Evidence, pages 127-128) says that most archaeologists and Egyptologists have abandoned the archaeological investigation of Moses and the Exodus as a 'fruitless pursuit'. He says there is also a consensus among biblical scholars that there was never an Exodus of the proportions described in the Bible.
Literary conclusions
Carol A. Redmount says, in 'Bitter lives', published in The Oxford History of the Biblical World, page 63, that recent research indicates that even more of the extant Exodus account than previously thought comes from periods during or after the Israelite monarchy or even the Exile. So, to a large extent, the story of Moses was written a thousand years after he was supposed to have lived. It then becomes credible that the story of his birth was based on the story of Sargon's birth.
Moses was not Sargon I, but his story appears to have been influenced by the story of Sargon.