The phrase "The Legend of Zelda" has been used in-universe at least once in the series, in the manual for Zelda II: The Adventure of Link. Here it refers to a story explaining why there are so many Princess Zeldas.
Link, the time has come when I must tell you the legend of Zelda handed down in Hyrule. It is said that a long ago, when Hyrule was one country, a great ruler maintained the peace in Hyrule using the Triforce. However, the King too was a child of man and he died. Then, the prince of the kingdom should have become king and inherited everything, but he could inherit the Triforce only in part. The Prince searched everywhere for the missing parts, but could not find them. Then, a magician close to the king brought him some unexpected news. Before he died, the king had said something about the Triforce to only the younger sister of the prince, Princess Zelda. The prince immediately questioned the princess, but she wouldn’t tell him anything. After the prince, the magician threatened to put the princess into an eternal sleep if she did not talk, but even still, she said nothing.
In his anger, the magician tried to cast a magic spell on the princess. The surprised prince tried to stop him, but the magician fought off the prince and went on chanting the spell. Then, when the spell was finally cast, Princess Zelda fell on that spot and entered asleep from which she might never awake. At the same time, the magician also fell down and breathed his last.
In his grief, the prince placed the princess in this room. He hoped that someday she would come back to life. So that this tragedy would never be forgotten, he ordered that every female child born into the royal household be given the name Zelda.