There's no contradiction between the two episodes: in episode 219, Shinichi never saw Kaito Kid (even during the "duel" with the guns, Kid was hidden behind the sheet) and he didn't even hear the name "Kid": he did ask Megure what's the thief's name at the end, but Megure was so focused on the code that Shinichi gave up asking, while still thinking "but then, one day...", foreshadowing that the two may meet again in the future.
Episode 76 is adapted from manga chapters 156-159, while the Clocktower Heist segment of episode 219 is adapted from the Magic Kaito manga chapters 23-24 (beware a faulty fan translation of the these two chapters in which Shinichi calls the thief "Kid" all the time, which doesn't happen in the original as I said above).
The Shinichi vs Kid showdown was an afterthought, as in it wasn't planned when the first Conan vs Kid case was written (Aoyama said so in his comment for the book "Detective Conan vs Kaitou Kid Perfect Edition") and yet when he decided to write a prequel Aoyama was clever enough to find a way around this, by preventing Shinichi from seeing Kid and learning his name. A similar trick was used by Aoyama for the prequel encounter between Shinichi and Heiji three years before the current timeline: neither of them manged to get a clear look at the rival detective or to learn each other's names; that prequel also had the trick of Shinichi and Heiji both solving the case while thinking it was solved by the other detective, thus avoiding a contadiction with a previous story that showed Shinichi solving his first case one year before the current timeline. Another thing is that Shinichi briefly interacted with Heiji's mother in the 3-year old flashback even though he doesn't know her when she first appears in the series: this can be easily explained by the fact that she did nothing to stand out and had her face partially obscured by a cap and ski glasses, plus their interaction was very brief.
Gosho Aoyama likes his work to be coherent.