It depends on which spell you use to bring back the dead.
There are five different spells that you can use to bring a dead person back to life, and they all work a bit differently, as you might expect.
Raise Dead
From the spell description:
This spell also neutralizes any poisons and cures
nonmagical diseases that affected the creature at the
time it died. This spell doesn't, however, remove magical
diseases, curses, or similar effects; if these aren't first
removed prior to casting the spell, they take effect when
the creature returns to life.
Reincarnate
Reincarnation completely replaces your body, so it will cure anything that ails you. Of course, it has the downside of not knowing what kind of race you'll get.
Revivify
Revivify doesn't explicitly say anything about what it does or does not cure, but seeing as how it's a low-level version of Raise Dead, it seems pretty clear that it's not meant to cure anything, magical or mundane. So if you died of poison, you'll still be poisoned when you're brought back with 1 hit point.
Resurrection
From the spell description:
This spell neutralizes any poisons and cures normal
diseases afflicting the creature when it died. It doesn't,
however, remove magical diseases, curses, and the like;
if such effects aren't removed prior to casting the spell,
they afflict the target on its return to life.
True Resurrection
From the spell description:
This spell closes all wounds, neutralizes any poison,
cures all diseases, and lifts any curses affecting the
creature when it died. The spell replaces damaged or
missing organs and limbs.
Conclusion
Extrapolating from this, it seems fairly clear that the assumption is that, unless otherwise stated, conditions are not removed when you die, or when you come back to life.
For the specific example of exhaustion, none of the spells directly call them out, but it seems fair to lump them in with "poisons and non-magical diseases", so anything other than Revivify should cure it. Note that this interpretation does mean that Revivify can't be used to revive someone who died of exhaustion, since they'll come back to life with 6 levels of exhaustion and immediately die again, but this isn't necessarily a bad thing.