An interesting topic
Although I think that Tolkien was undoubtedly influenced by his own experiences of losing both of his parents at an early age the theme of the adopted/fostered hero is one that crops up time and again in literature. I can think of many instances from Greek myth to the Bible, Shakespeare and beyond.
Not all of these adoptions/fosterings ended happily, but here are a few of the positive ones I can think of:
Beowulf, who was 'sister-son' to the King of the Geats, his own father having died, he was raised by his uncle, the king.
Moses, adopted and raised by the sister of the Pharoah of Egypt.
Luke Skywalker, orphaned and raised by his aunt and uncle (sorry, I
had to add that one
Each of these, having been raised in a benevolent atmosphere went on to perform heroic deeds. I wonder if those whose experiences were less fortunate were spurred on to less glorious deeds? Time for some research, I think!
Like Bethberry, I also wonder if we can include the influence of fairy tales?