Do remember, that the whole point of Star Wars, is to be a *somewhat* belivable sci-fi fantasy universe, based around a single empire with little strife.
The WH40K world is not supposed to be believable. Every soldier is a hero, every psycher can destroy worlds, and every ship can decimate planets. This whole universe has zero political, or even racial (species), stability.
The Star Wars universe would likely win in the long run, though the 40K universe would win in any battle, the only factions that aren't dieing out, from my understanding, are the Tau, Tyranids, and Orks. The Eldar openly admit they are dieing. The humans are collapsing, from over-expansion, deteriorating genetics, and technological stagnation. Chaos goes with the humans. Dark Eldar can't make it without slaves. And the Necrons only exist to fight the old gods, who, if left alone, wouldn't have woken in the first place.
All the Star Wars universe would have to do, would be to flee, using their strange, non (The) Warp drives, and wait for the Imperium to forget about them. The Eldar wouldn't care, Orks would get lost, Tau would ignore, and Chaos would be too concerned with the Imperium, to follow.
After a few thousand years, far away from everything, the Star Wars universe would come into contact with the Orks, Tau, or Tyranids, whichever was last surviving.