They survive.
Tolkien says of Shelob:
Quote:
"Shelob was gone; and whether she lay long in her lair, nursing her malice and her misery, and in slow years of darkness healed herself from within, rebuilding her clustered eyes, until with hunger like death she spun once more her dreadful snares in the glens of the Mountains of Shadow, this tale does not tell."
As for the Moria orcs, I think a lot of them went to fight the dwarves and men of Dale, and so some were killed. And when Sauron was defeated, they were pretty much destroyed or fled. So possibly dwarves went back to Moria? We don't know.