In Greek mythology the Underworld was the residence of the dead. It was presided over by the god Hades and in latter times came to be called by that god's name. Good and bad alike traveled here upon death, there being no strict heaven/hell dichotomy as appears in orthodox Christianity. The "pilgrim" which arrived here for Socrates was most likely one's soul, and not an ensouled body.
By tradition, this house of Hades was not viewed as a desirable place to be even for the just who did not need to fear punishment. Achilles, for example, having taken up residence upon his death in the Trojan War, said he would have prefered to live as a slave in the world of the living rather than to live free in the Underworld!
Socrates' suggested that death was an opportunity
for philosophical discussion with the greatest people ever to have lived.
Hence, he did not have a pessimistic vision of the afterlife.