At the end of The Empire Strikes Back the characters meet at the Rebel fleet's rendezvous point and look at an object that looks like a galaxy:
So were they in intergalactic space or is this just some nebula?
It was supposed to be the galaxy, that is the galaxy that the films take place in. Essentially, the rebels had to flee the galaxy to find sanctuary. This was stated by Leland Chee (the fellow whose job it was to keep track of Star Wars canon) on the Star Wars message boards in 2003.
Q. what is the official explanation for the end of ESB when the main characters appear to be looking at the galaxy from a distance?
LC: Since that image (or one similiar from AOTC) has been used as the backdrop for published galaxy maps, I think it is pretty clear that it is the galaxy that you are seeing.
However, it has been inconsistently identified in EU materials over the years, leading to some debate on the subject.
The answer is revealed in Legends. Wookieepedia cites Shield of Lies and Of Possible Futures: The Tale of Zuckuss and 4-LOM in revealing that the Rebel rendezvous point
was located beyond the Galactic Rim, far above the galactic equatorial plane and far away from any stars. It was beyond the galaxy's gravity well, making it a perilous journey to reach, one that many of the Rebel ships escaping from Hoth may not have been able to make. It is likely that the Rebellion suffered additional losses in the attempt to reach that point.
This means they are looking at the Star Wars galaxy.
The (canon) Star Wars factbook Star Wars Made Easy: A Beginner's Guide to a Galaxy Far, Far Away identifies the object as a protostar, not a galaxy.
Interestingly this conflicts with previous sources (such as the Star Wars: The Empire Strikes Back - Radio Dramatization indicating that the rendezvous point was on the very edge of the outer rim, looking back into the Star Wars Galaxy.
Threepio: May I ask what is the latest word on the rallying of our forces?
Leia: It's better than we thought at first, Threepio. Just about everyone who got off Hoth made it here. So, we've got some supplies, a bit of fighter cover. Our losses in ships and lives weren't as bad as they might've been. Most of the Starfleet was busy chasing the Falcon.
Lando: So you're not just gonna sit out here on the rim of the galaxy much longer, hmm?