To summarise the accounts.
Matthew:
Jesus is born in the reign of Herod the Great (2:1, 2:22)
A star appeared at the time of his birth (2:7)
The Magi visit (2:11)
Mary, Joseph and Jesus escape to Egypt. (2:14)
Herod orders the death of all babies of about the right age (2 years or less) in and around Bethlehem (2:16)
After Herod dies the family return from Egypt (2:22)
Warned by a dream they move to Nazareth in Galilee (2:23)
Luke:
Luke starts with the census of Quirinius which followed the removal of Herod's heir, Archelaus (2:1)
For the census Joseph goes from his home in Nazareth to Bethelehem (2:4)
Angels appear to shepherd (2:11-15)
After her period of purification (40 days - Leviticus 12:2-4) Mary takes Jesus to the Temple in Jerusalem (2:22)
Then Joseph, Mary and Jesus return to Nazareth (2:39).
They remain there, visiting Jerusalem each year for the Passover. (2:41)
So lets go over the inconsistencies:
They are set at different times. Matthew has the return from Egypt not long after the ascension of Archelaus. Luke has Jesus born during the census that followed Archelaus' reign. Archelaus was not deposed until the tenth year of his reign.
Luke has Jesus' family as residents of Nazareth the whole time - Matthew has them living in Bethlehem until the Flight to Egypt, only moving to Nazareth after they return. By Matthew's account Jesus must have been about a year old at the time of the Flight.
The Magi, the Massacre of the Innocents and the Flight to Egypt have no place in Luke. Joseph and Mary don't stay in Bethlehem long enough.
Matthew doesn't mention the angels or the shepherds.
The only common elements are the personal names and the birth in Bethlehem. Yet these are elements we should expect to agree even if the framing story is mostly fiction.
As for legendary development the clearest example is the Massacre of the Innocents. There are no other sources that confirm it - it doesn't even fit into Luke's story. And if it had happened we might reasonably expect it to be remembered and reported by historians hostile to Herod - notably Josephus. It is a common theme of legend - not only Moses, but Sargon, Krishna, and Romulus and Remus were threatened by hostile rulers. Suetonius even tells a similar story about Augustus - although as Augustus was born during the Republic there was no King and in this case the threat remained a threat.
Julius Marathus informs us, that a few months before his birth, there happened at Rome a prodigy, by which was signified that Nature was in travail with a king for the Roman people; and that the senate, in alarm, came to the resolution that no child born that year should be brought up; but that those amongst them, whose wives were pregnant, to secure to themselves a chance of that dignity, took care that the decree of the senate should not be registered in the treasury.
Internet History Sourcebooks