Nemesis can't be made to fit without significant contradictions with the rest of the Robot/Foundation universe.
There's no reason The End of Eternity couldn't fit in with the Foundation universe (or many other fictional universes!), given the events of that novel. The themes of the Robot/Foundation universe towards the end really tie in well to the themes of End of Eternity, especially if you include the Second Foundation Trilogy. In my fanfic sequel I posit them being linked as a potential explanation for certain other events, but there's no real possibility of evidence one way or another.
As for why? BecauseWell, Asimov himself references both stories somewhat obliquely as legends within the Foundation universe. There's an off-hand reference to the Eternals in Foundation's Edge, and one to Nemesis in Forward the Foundation. But neither of these really makes much sense as being historical fact within that fictional universe. Even if they existed, there's no way the Eternals would be known to history. And there's no way Nemesis happened as written either. But it's really impressive that Asimov wrote such a large consistent universe, and he liked to tie his stories together after the fact. So sometimes fans dotake those off-hand comments and interpret them as full-on shared-world connections, even if it for himdefies internal consistency.