I don't have the books on hand at the moment and it's been years since I DM/played a D&D game so I may be horribly rusty on mechanics, but I'll still chime in with my two cents worth.
As I recall, the resurrection spells only succeed if the soul of the person is both free to return and wants to return to the body. Meaning that the soul can't be imprisoned or bound by another spell, and the person actually wants to leave the celestial domain of their chosen god/goddess. The imprisonment usually isn't an issue I've found, but for some characters the decision to remain with their deity or come back to earth could be a tough one to make.
The memories part though is an interesting question that to be honest I had never considered before you brought it up. I like the idea that you had initially. If they are revived as a mindless zombie or shambling undead of some sort, it's likely they wouldn't remember anything of what their body did. As they become more intelligent undead, more memories likely would come in, though not a complete recollection of events. Probably more as fuzzy memories, just on the edge of being able to see it crystal clear but enough to recognize bits and pieces of what they did.
The only type of undead that I don't think could be resurrected, short of maybe a Wish spell, would be a lich. Given that they have to choose to drink the potion that kills them, and that their souls are bound into the phyractory that they constructed, personally I would consider them beyond saving.