The rules support that a specter's soul is destroyed on death of the specter, but the rules also support that if that is not a satisfactory outcome, then the GM can change that outcome.
If the GM thinks it's better for the game that the specter's soul is not destroyed, then the GM can and should make that happen.
First of all, what do the rules say?
The entry for the specter says
A specter is the angry, unfettered spirit of a humanoid that has been prevented from passing to the afterlife. Specters no longer possess connections to who or what they were, yet are condemned to walk the world forever. Some are spawned when dark magic or the touch of a wraith rips a soul from a living body.
Furthermore, it says the specter's "only end the oblivion that comes with the destruction of its soul".
As an action, a wraith can create a specter from a dead humanoid, and that "target's spirit rises as a specter".
Things are not looking good
Any reasonable reading of these rules is that, yep, the souls of specters, regardless of source, are beyond redemption, the only possible end is oblivion.
Or is it?
Specific Beats General
The rules say, "specific beats general".
Could there be a rule that says, "in this specific case, a specter's only possible end is not oblivion".
The specter's description says, "A specter is the angry, unfettered spirit of a humanoid that has been prevented from passing to the afterlife." What if in a specific case, at the time of the destruction of the specter, whatever was preventing its passing into the afterlife was removed? It is not unreasonable to speculate that in the case of an otherwise good, not-hate-filled humanoid, who had been turned into a specter by a wraith, unspecified powers would say, "hey, not so fast, the powers of evil don't get to destroy a soul on the side of good through such a cheap trick", and intervene, allowing the soul to pass into the afterlife.
Is there such a rule? Not that I am aware of, but if there were such a rule, its specificity would beat the generality of the specter's entry.
Rulings Not Rules
"Rulings not rules" is an important element of D&D.
D&D isn't a video game, where every action is determined in a mechanistic way. Instead, as the DMG says, "every DM is the creator of his or her own campaign world", and that the rules "present default assumptions" for how things work.
The rules to not explicitly and unambiguously answer every question. In such an open-ended system, they can't. In the end, even the most by-the-book GM will have to make some determinations.
What is a fun and satisfying outcome?
That is going to depend on the game and table.
Some games, character death is frequent. In others, it's extremely rare.
Depending on the game, a player might not be particularly happy about their character being permanently randomly destroyed by some chance encounter. Depending on the game, the GM might not want that to be the outcome either.
Whether or not to kill off a PC is beyond the scope of this answer, but if the GM doesn't want to permanently kill off the character, then they shouldn't feel obligated, because they are in charge.
The rules actually say this: "The D&D rules help you and the other players have a good time, but the rules aren’t in charge. You’re the DM, and you are in charge of the game."
A Way Out
There are an infinite number of ways out of killing off a PC that has been turned into a specter. I'll present a hypothetical one.
Imagine a session in which a PC's character is killed off as a specter. Reading the rules, the players and even the GM might be like "hmm, that's it, time to roll up a new character."
But what if, outside the session, the GM (maybe in consultation with the players) decides that isn't a satisfactory outcome?
In session, the GM says, "Wendy, you are troubled by dreams of Phil. Ever since he was killed by the specter you are having dreams in which he somehow needs your aid."
Wendy and the party consult with each other, and perhaps with more nudging from the GM, they consult a priest in a temple of Pelor (or whatever was Phil's deity, if any) and the priest says, "Hmm. I have never heard of a soul that was once a specter being returned to life, but perhaps the soul was not destroyed but is somehow trapped or stuck. It's not as if there's a 'rules-of-the-afterlife' manual, it's a complicated multiverse. Bring me the body and as much relevant material and I will pray for divine guidance on how this good person can be restored to life." After some amount of effort, maybe a lot, the character is restored.
This is not hand-waving, or cheating, or breaking the rules, or going against RAW. This the GM explicitly following the rules of making the game fun. Now, whether the GM should, or how the GM should do it, is out of scope for this answer.