It reminded me that one of the most enlightening things I realized about superheroes was when I noticed that recent Superman movies try too hard to tie the Man of Steel to Jesus with a bunch of transparent cinematic metaphors. The best way to imagine Superman is as a messiah, but explicitly not Jesus: He is the messiah as imagined by a Jewish kid raised on mid-20th-century science fiction.
In the absence of anything other than a common origin, it may not be based on Moses. The story of Moses abandonment and adoption is itself a retelling of an older Sumerian myth, and thst was probably a retelling as well.