Are there any spells, Necromancy or Sorcery, that allow you to destroy a ghost and capture his memories in the process?
In general, "total memory transcription" is iffy territory, because... well, put bluntly and paraphrasing from when this question came up in the Raksi write-up thread back in the days of TAW; while it's not "take-back" territory, it's sort of in the general area you can see "take-back" territory from if it's a clear day and you shade your eyes and squint a bit. If you've spent your life hoarding knowledge and destroying hard copies so the information is only held in your memory to stop people from killing you and
lessening the world by being selfish and greedy, you don't get to undo that in your last breath by transcribing it all onto a giant roll of parchment. You can dramatically gasp out a few key things, of course
[1], but if you didn't want that knowledge to die with you, you should have written it down, spread it as far as you could, made copies and backup copies, taught people, etc. You should, in fact, have transcribed it before you died
the way people normally transcribe things.
And similarly, if someone
else has done this, you don't get to shortcut the moral dilemma of "this is a terrible person, but if we kill them we will lose all their accumulated knowledge that could help so many, which they are hoarding precisely because it makes people like us hesitate to kill them" by going "actually we can just copy your memories into this handy Pensieve we have here!" No, you either murder them and lessen Creation until you can independently redevelop the lost knowledge (which could well take Ages, in the capitalised sense of the word), or you live with them as a necessary evil just as they want you too.
Now, if they were stupid enough to leave a ghost while being fully aware of what necromancy can
do to the dead, and didn't have something set up so that they went straight to Lethe, do not pass Go, do not collect $200... well, then there's no need for a convoluted "destroy them and cache some sort of memory copy" spell; you can just bind them to write down everything they know and then make them do jumping jacks over a floor covered in caltrops for the rest of eternity, or whatever else suits your amusement or whim. Ghosts are basically your bitch if you know necromancy; in some ways even more so than mortals.
I speak for 2e and 2.5e here, of course, as I don't know how 3e has impacted these themes, or if they still care about the "no takebacks" thing that was such a strong part of Exalted's inception.
[1] "The secret weakness of the Deathlords is... Ghost Eating Technique! And any other spirit-killing Chaaaaargh..."