This is a fascinating question not from a rules standpoint, but from a setting one. When you die in D&D, where does your soul go and how long does it take to get there?
We can presume from the existence of Revivify that a soul doesn't instantly pop off to an afterlife. Even undead that create spawn from what's left of your remains don't tend to do so instantly.
We know that souls exist- magic jar, demiliches, and Blackrazor all confirm this mechanically (in 3e there was a material called thinaun, and previous editions had other spells like Trap the Soul that could manipulate or destroy souls). The astral form one assumes when employing astral projection is stated by the spell to be your soul, and thus if your silver cord is severed, your body dies as your soul goes...somewhere.
But the precise mechanics for how someone becomes a petitioner or a ghost and how long this process takes, how your soul gets to it's destination, and, at what point, you cease to be the person you were and become something else, are deliberately kept murky.
We know that there is a limit on how long you can be dead before mortal magic can restore you to life (200 years, as per True Resurrection), as long as the soul is "free and willing", but surely souls don't take that long to become petitioners on the off chance someone can cast a 9th level spell to bring them back to life!
This is all left to the DM to decide, but I think it's very likely that at a certain point, a soul does become an entity that can be contacted (again, citing the various spells that can bring one back to life- a will is implicit in being willing).
Further, this doesn't step on Speak With Dead because that spell has nothing to do with the soul- it "grants the semblance of life and intelligence to a corpse". These are two different effects.
Things become murky with undead- you can't raise an undead creature (outside of True Resurrection), but that doesn't imply that a soul is trapped inside a zombie necessarily- it could simply mean that the animating force prevents the soul from being rejoined to it's body (left for the DM to decide is whether the remains of a slain zombie is the corpse of a person or a zombie!).
In the end, in absence of a hard answer, I would say that yes, you can use sending to contact a dead soul, but there is apparently a liminal period where the departed might not be in a state where it can answer (in effect, the soul is incapacitated or possibly in a location that cannot be accessed, like the demiplane of a psychopomp, divine entity, warlock patron, or greedy fiend), which means it's really up to the DM.
An interesting variant of this is katabasis- that is, using plane shift or similar methods to make your way to an afterlife to physically retrieve the soul of a fallen comrade, a common theme in mythology. There's certainly nothing preventing you from attempting to do something like this, but the residents of wherever you end up might certainly have something to say about it, making the return of your deceased acquaintance an epic adventure in of itself!