I'll offer a perspective from The Church of Jesus Christ of Latter-day Saints.
As they say, a picture is worth a thousand words =)
Latter-day Saints believe in an intermediate state, often referred to as the Spirit World (usually Sheol in OT & Hades in NT), which is divided into Paradise & Spirit Prison. Here the spirits of the dead await the resurrection; judgement comes following the resurrection.
From Alma 40:21b:
there is a space between death and the resurrection of the body, and a
state of the soul in happiness or in misery until the time which is
appointed of God that the dead shall come forth, and be reunited, both
soul and body, and be brought to stand before God, and be judged
according to their works.
(note that "soul" here is used not to refer to body + spirit, but as a reference to the spirit, as in Acts 20:10. See also Alma 40:11-14)
What happens in the Spirit World
Do people in the intermediate state already know whether they are saved or lost (i.e. their judgement)?
The Spirit World remains a place of learning & development. We believe that our spirits pre-existed mortal life:
In the premortal realm, spirit sons and daughters knew and worshipped
God as their Eternal Father and accepted His plan by which His
children could obtain a physical body and gain earthly experience to
progress toward perfection and ultimately realize their divine destiny
as heirs of eternal life. (The Family - A Proclamation to the World,
That progression continues in the Spirit World. Paradise is a place of learning:
50 For the dead had looked upon the long absence of their spirits from
their bodies as a bondage.
51 These the Lord taught (Doctrine & Covenants 138:50-51)
This principle was also known by Ante-Nicene Father Origen of Alexandria:
all the saints who depart from this life will remain in some place
situated on the earth which holy Scripture calls paradise, as in some
place of instruction, and, so to speak, class-room or school of souls,
in which they are to be instructed regarding all the things which they
had seen on earth, and are to receive also some information respecting
things that are to follow in the future...all of which are revealed
more clearly and distinctly to the Saints in their proper time and
place. (De Principiis 2.6)
Those in Paradise have had, since missionary work was organized in the Spirit World after the death of Christ (see 1 Peter 3:18-20), the opportunity to teach the gospel to those in Spirit Prison:
I beheld that the faithful elders of this dispensation, when they
depart from mortal life, continue their labors in the preaching of the
gospel of repentance and redemption, through the sacrifice of the Only
Begotten Son of God, among those who are in darkness and under the
bondage of sin in the great world of the spirits of the dead.
(Doctrine & Covenants 138:57)
This offers an answer to the question "what happens to those who never hear about Jesus Christ in this life?" (they'll be taught the gospel in the spirit world), and also explains one of the reasons why upon entering the Spirit World, people do not necessarily know yet what the outcome of their future judgement will be: the test is still in progress.
Many of those in Spirit Prison still need the knowledge that enables them to be judged on equal standing with those who have already learned the Gospel and accepted (or rejected) God's covenants:
For for this cause was the gospel preached also to them that are dead,
that they might be judged according to men in the flesh (1 Peter 4:6)
Does that mean we can procrastinate?
Does this mean we might as well eat, drink, and be merry, party in this life, and then wait and accept the gospel in the spirit world? Definitely not.
I’ll establish this two ways:
First, as taught by Amulek:
32 For behold, this life is the time for men to prepare to meet God;
yea, behold the day of this life is the day for men to perform their
33 And now, as I said unto you before, as ye have had so many
witnesses, therefore, I beseech of you that ye do not procrastinate
the day of your repentance until the end; for after this day of life,
which is given us to prepare for eternity, behold, if we do not
improve our time while in this life, then cometh the night of darkness
wherein there can be no labor performed.
34 Ye cannot say, when ye are brought to that awful crisis, that I
will repent, that I will return to my God. Nay, ye cannot say this;
for that same spirit which doth possess your bodies at the time that
ye go out of this life, that same spirit will have power to possess
your body in that eternal world. (Alma 34:32-34)
We will be the same people then as now--if we have wasted away the talents and opportunities God has given us in this life, we will be held accountable for that in the next. We will not magically be transformed into someone else, nor will our desires be different. We will have already been given a time of probation (Notice also that Amulek is speaking to people who have indeed had the gospel taught to them in this life).
Second, God’s plan is not about filling out a checklist, it is about becoming. To the extent that God has given “checklists”, the checklists exist for the purpose of aiding our process of becoming. To borrow a phrase, the checklists were created for man and not man for the checklists.
If we use whatever portion of God’s light we are given in this life to progress, we will continue in that direction in the next life. If we reject God’s light, we may find eternally too late that we have lost opportunities that will not return, and we will limit our eternal potential.
We will be held accountable for what we know and the opportunities we’ve been given:
47 And that servant, which knew his lord’s will, and prepared not
himself, neither did according to his will, shall be beaten with many
48 But he that knew not, and did commit things worthy of stripes,
shall be beaten with few stripes. For unto whomsoever much is given,
of him shall be much required: and to whom men have committed much, of
him they will ask the more. (Luke 12:47-48)
A more extensive discussion of this topic in my post here
Surprise! It's Judgement Day
If they do [know their eternal fate immediately after death], then how do proponents of an intermediate state make sense of the fact that Matthew 7:21-23 seems to convey a degree of surprise in the individuals on Judgement Day?
The (Nephite) prophet Jacob taught, speaking of the time of the resurrection:
13 O how great the plan of our God! For on the other hand, the
paradise of God must deliver up the spirits of the righteous, and the
grave deliver up the body of the righteous; and the spirit and the
body is restored to itself again, and all men become incorruptible,
and immortal, and they are living souls, having a perfect knowledge...
14 Wherefore, we shall have a perfect knowledge of all our guilt, and
our uncleanness, and our nakedness; and the righteous shall have a
perfect knowledge of their enjoyment, and their righteousness, being
clothed with purity, yea, even with the robe of righteousness. (2 Nephi 9:13-14)
There is no promise of a perfect (or complete) knowledge prior to the resurrection, but it is promised at that time. I suggest, then, at least 3 ways people may be "surprised" or "better informed" on judgement day than they were at the time they entered the Spirit World:
The righteous have spent their time in the Spirit World continuing to learn and progress, and they are now fully prepared to stand before God. They weren't "perfect" at the time of their death, but they were keeping their covenants and progressing in that direction--they continued in that direction in the Spirit World.
Those who did not learn the gospel in this life will not have completed their "probationary state" and may genuinely wonder as they enter the Spirit World "what the heck is going on??" They'll have the opportunity to learn this before judgement day.
Those described by Matt 7:21-23 may be too prideful to realize--until this time--how far short they fell of where they ought to have been. An unhappy protest (such as described in Matt. 7:21-23) upon making this realization is not surprising.
This is by no means an exhaustive list; there may also be those who are unsurprised by the outcome on judgement day.
There's plenty for us to learn in this life and in the next, but:
If ye are prepared ye shall not fear (Doctrine & Covenants 38:30)
Disclaimer: my comments are the product of my own study and do not constitute official statements by The Church of Jesus Christ of Latter-day Saints