It depends entirely on the type of undead and how they were created. Liches very explicitly keep the same soul they started with. Vampires and mummy lords seem to as well. I have always viewed lesser undead, even those with some intelligence, as having no soul at all. This is supported in 3.5e at least by the text of the Magic Jar Spell which states that "Only sentient undead have, or are, souls". (Thanks to GMJoe for pointing that out)
As Rob mentions create undead is mildly ambiguous, but my interpretation is that it would generally create the soulless variety. Even if it created undead with souls, it would not necessarily be the same soul the body had in life.
Edit to respond to question edits:
For some types of undead, the answer is clearly that they would know everything the living version did and could relay that information. Liches, vampires, and mummy lords will have access to all the knowledge and nearly all the skills (I say nearly because a paladin of a goodly deity will almost certainly lose some powers as a vampire and there are similar restrictions on some other skills...) of the pre-undead version.
I would say the answer is clearly no in the cases of basic skeletons and zombies. For create undead specifically, the book is unclear, but I am going to go with "No." if I were the GM. For one, it just seems wrong that a spell of that level could drag back the soul of a goodly person and it gets awkward that a spell of that level could return someone with all of their skills in life. I would not want a spell like that used to say readily create scribes and blacksmiths much less wizards.
Furthermore, even if you go with a different interpretation and say that they have most of the skills and knowledge of their past life, that doesn't mean they will share it easily even if commanded. For instance, the mummy description specifically says that while they can speak, they rarely bother, most of those undead have a specific alignment (chaotic evil for ghouls just for example). This seems to imply that even if the old soul is trapped in there, it might be horribly warped (or at least temporarily shackled) by evil. That could imply that even if the old soul and mind was theoretically in there, it might not be able to provide information in a coherent form even if it wanted to or was compelled to.
So, the short version is that while there is some room for debate, if I were the GM I would not permit the use of create undead for interrogation purposes. It seems to go against the spirit of the spells intended use and is only debatably within the letter of the spell description. It also could be very unbalancing for a mid-level necromancer to be able to dig up the bodies of prominent people and then interrogate them, or use their advanced skills, or use their tormented undead self as hostages. Such things are certainly possible, but they require more power than create undead.