That reminds me of James Morrow's This Is The Way The World Ends.

After a nuclear apocalypse wipes out most of humanity, the ghosts of now-will-never-be-born future people hold the survivors to trial because they're ticked off at losing their opportunity to live.