One cannot conclude from that that an oath has to be by the name of Ilúvatar in particular to have that power. That's a valid interpretation, but not a necessary one. I take it to mean that it was an extremely powerful oath, because they invoked Iluvatar's name, but that doesn't mean a slightly lesser oath wouldn't have kept their spirits from Mandos.They swore an oath which none shall break, and none should take, by the name even of Ilúvatar, calling the Everlasting Dark upon them if they kept it not ..... For so sworn, good or evil, an oath may not be broken, and it shall pursue oathkeeper and oathbreaker to the world's end.
It would be like seeing a sentence "But he was wielding a mighty sword, forged in Gondolin, and struck the troll a mighty blow" and concluding that only swords forged in Gondolin can wound trolls.
In any event, there have been even more people who would know Ilúvatar's name than there were kings descended from Isildur, so even if we want to accept this contrived condition we have plenty of people capable of swearing strong enough oaths to become ghosts.
Problem solved! Ghosts in every ruin it is.