It does look like the joint to the shower drain was never glued and because of settling the pipe dropped down perhaps as much as an 1 1/2" to 2". It looks like there may even be some of the gray gravel visible that is supposed top be under the 4" concrete floor slab. So much for 4" of concrete at the drain, if that is the case.
The possibility of jiggling the pipe back up with something that will fit in the pipe (a plumbers test ball with a chain and ring attached to it comes to mind) may be your best option to get it back together without breaking up your floor, though breaking the floor up may still be your best option, since I see no pan liner visible inside the drain interior. but that is not the worst problem for now.
The hope would be, that IF there is gravel around the pipe and IF the pipe was connected to the drain at one time, but not glued, that it would go back up. The jiggling would give the gravel a chance to "vibrate" back around the pipe again and settle under the pipe to help support it. The thing will be is, PVC glue and primer will not stay liquid long enough for all this to happen. There is a chance, first getting it to come back up, second to get it to drop back down enough to get a little primer and glue in there and give the pipe one last pull up to set the glue.
I may as well add that thoroughly cleaning the pipe is a prerequisite to all this. There may not be much you can do with the pipe itself, but the drain can get a good cleaning so the glue has a half of a chance to grab.
Beyond that, bridging the gap with a good grade of caulk would have to suffice. I would make a point of pulling up on the drain, for if it did settle down as much as I think, the slope of the pipe needed to make the water flow where it normally needs to go has been greatly reduced, or possibly it is going the wrong way whereas the pipe holds water.
Edited to reflect OP's comment
I didn't think they were available but there are internal couplers at a big box store If you can locate an internal coupler would be ideal although it will restrict the pipe a bit, but it should not impact the performance of the drain. After you pick up internal coupler, to install it, first remove the "lip" that is at the pipe location. If you have a dremel tool with a grinder would be ideal, or you could use a coarse half round file if you have it.The idea is after the interiors of the pipes are cleaned that the internal coupler will go in to the drain and connect with no glue. "Dry fit" first to make sure it will go together. The coupler, according to the picture on the website has a collar so it only goes in so far. From what I see of the picture, some of it that goes into the existing pipe could stand to be cut off, external couplers set about of 1" of pipe in them. Check first, it may go in easy enough. If it is tough, cut it to a new length and retaper the outside edge to help ease it in place. This also helps the glue from getting scraped off while inserting the coupler. Once you get it in as far as you can comfotable and still remove it, mark the top so it can be cut so it will not set higher than the interior slope of the drain. A small piece of 2" pipe will fill the gap to the top of the shower drain.
Once you get everything ready and it SEEMS like it will all go together, primer and glue the coupler to the pipe in the concrete. And presuming the little peice of pipe will fit into the gap left by the coupler, glue all surfaces and shove iot in quickly the glue grabs very quickly. Have a block of wood and a hammer ready to tap it in place if it wants to be difficult when the glue is added. This why I said "SEEMS" earlier. Everything can fit real nice while there is no glue present, but as soon as glue is added, EVERYTHING changes and now it is for keeps on top of that. So I stress, make sure everything is clean, burr free, goes together easy enough with no glue, then glue it and go for it.
As a note: PVC joints are made so they get tighter as the pipe goes in farther, so, with careful measuring, and NOT setting everything into place as far down as it goes (if you do you may not get it back out since there will be nothing to hold onto to remove it) then glue it up and go for the final set.
You will also need to hold the parts in place for a half minute or so until the glue "grabs". PVC joints will allow the pipe to rise back up if not held in place for a while.