Kardecist Spiritism (As well as many similar doctrines) believe that unjust suffering gives you a kind of "credit" (And takes it away when you inflict that suffering onto others) that you can use for benefits in the afterlife, and that you can actually choose to be born in a shitty situation to get more of that "credit", as well as "growing and developing your soul to be of higher light" so you can be reborn on more developed worlds (As in, not shitty ones like ours.)
I've had a short period studying some of its doctrines, and while I don't believe in them anymore, it still amuses me how it compares to a video-game, or more precisely, a roguelike with macrogame progression and a difficulty system that rewards harder levels with more resources.
Man, who knew the gods are just transcendental game devs!
*puts autistic hat on*
Okay, amusing thoughts aside, I believe it is a possibility, but there is no concrete evidence for any kind of incorporeal consciousness, save for some really far fetched string theory jibber-jabber that's been in proverbial beta for over a decade. It's fun to theorycraft, but near-death experiences can not only be described as dying dreams, and as such built from memories and sensory deprivation, but we also have no way to really evaluate if it constitutes enough "death" for it to be reliable as to what the afterlife looks like. (As in, how dead and for how long one has to be to actually experience the afterlife, and what death means in that case?)
In the end, it's just fodder for creative minds, and I think it's neat to build your own fantasies off of it, but in the end they're just that: Fantasies. And until we have a reliable way to rationally see and describe what goes on in the after-life, let's leave it at that, shall we?