I remember having read that only beings born spontaneously (opapatika), for example, gods, hell beings, and hungry ghosts, can remember their past life. I don’t remember where I have read it. Does anyone know the source? Is it from suttas, commentary, Abhidhamma, or else?
Iirc, one of the problems of Brahmas was that they’re unable to recall their past lives, and thus erroneously think themselves eternal. So, I think that, just like humans, some devas can recall their previous lives and some can’t. But this is all from memory. Happy to be proven wrong
It is certainly a striking feature of the e.g. Pettavatthu that all the ghosts can recall their past lives, but that might be selection bias: all the ghosts who couldn’t talk eloquently about their past deeds would probably have been excluded from the collection
My recollection (not based on particularly careful study) is that the only beings (other than the Buddha and some arahants) who talk about specifics of their past lives are, indeed, in the spontaneously-born category. For example: SuttaCentral
Interestingly, contemporary analysis of children with past-life memories shows they usually died rather suddenly, and the children tend to forget their memories as they grow up. So there may be something to this, that quick rebirths are more conducive to keeping memories than a gradual death/rebirth.