3 Answers
3

This spell does not let you actually speak
to the person (whose soul has departed). It
instead draws on the imprinted knowledge
stored in the corpse. The partially
animated body retains the imprint of the
soul that once inhabited it, and thus it can
speak with all the knowledge that the
creature had while alive. The corpse,
however, cannot learn new information.
Indeed, it can’t even remember being
questioned.

The soul of the dead body is off wherever those souls go, this spell is using the residual memories of the actual body to answer questions, so the resurrected have no idea if they've been interrogated or not

Ultimately I think it's up to the DM, there's nothing that states that a character remembers anything about events that happened after their death on revival. Nor is there anything that suggests they don't remember events that happened after their death either. I know if I was running, I would probably go with a vague, 'you don't remember any specific details but have some vague notion of events after death such as billowing heavenly clouds, or burning brimstone pits'. In that case it might be remembered as seeing a vague silhouette with lips silently moving, but no recollection of exactly what words were used.

Of course the flip side is that this is a world of magic, and magic does what magic does. If you think a character should have full recollection of events after death, and your DM agrees with it go for it. If you think that the afterlife should be mysterious and vague, but that since your soul is briefly called back to your body in some fashion for speak with dead those events are clear, then that's fine too.

Ultimately it's gonna come down to DM fiat one way or the other, but as long as the rules are internally consistent I'd be fine with it either way.

I've always felt like there's an afterlife in most 3.5 settings and that resurrection is just bringing them back. As such, it's definitely fair to say that the individual is conscious when they are between coming back to life, and would remember what happens. They may not necessarily associate it correctly, but they wouldn't necessarily be worse at it.

EDIT: Ah, it's referring to a specific spell; in which case I'd say that it only is discovered if the dead character is spectating (probably a GM fiat thing), or if they scry it out.