<p>Two possible explanations.
</p><p>1. Servants don't lose all their memories, originally is was stated (I think, cant quote a source off the top of my head) That the information gathered returns to their original in the Throne. So they don't "remember" it as me or you would, but simply have this record of a thing that happened. This has since included some retconning, as it seems many servants in GO remember your encounters with them over various itterations, though this in turn could be part of the fact that the Grand Orders exist outside the natural time stream. Either way, the information on such weapons would still return to Archer.
</p><p>2. The more likely, if more headache inducing answer is simply that Archer is Shirou Emiya. While not the same one, he lived through a Grail War in his life and likely not only copied weapons held by the heroic spirits there in, but also possibly those belonging to Emiya himself, making the reason he has them now, because he witnessed having them in the past, making them both legendary weapons, and paradoxical as all hell.
</p><p>Still, neither of these explanations are mutually exclusive and likely the real answer is probably some combination of his experiences while he was alive, and information recollected as a heroic spirit. You have to remember after all, that while in reality it's unlikely that anyone would encounter a legendary weapon, Emiya was a magic user, and would have encountered all manner of relics, mystic codes and possible Grail Wars that would have allowed him the chance to record and store multiple noble phantasms.
</p>