Different categories of inhabited worlds
From the book: The Gospel according to the Spirititism - Allan Kardec

From the teaching given by the spirits it appears that, as regards the degree of advancement or inferiority of their inhabitants, the various worlds are in very different conditions from one another. Thus, among them are some whose inhabitants are even more inferior than those of the earth, physically and morally. Others are in the same category as ours; still others are more or less superior in every respect. In the lower worlds existence is entirely material, passions reign supreme, moral life is almost nil. As it develops, the influence of matter diminishes, to such an extent that in the more advanced worlds life is, as it were, absolutely spiritual.
In the intermediate worlds there is a combination of good and evil, with a predominance of one or the other, according to the degree of advancement of those who inhabit them. Although no absolute classification of the various worlds can be made, it is possible, according to their state and destiny, and on the basis of the most salient nuances, to divide them broadly as follows: primitive worlds, destined for the first incarnations of the human soul; worlds of atonements and trials, where evil predominates; regenerating worlds, where the souls who have yet to atone acquire new strength and rest from the toils of struggle; happy worlds, where good prevails over evil; celestial or divine worlds, the abode of purified spirits, where good reigns supreme. Earth belongs to the category of worlds of atonement and trial, and that is why man is exposed to so much misery there.
Spirits who incarnate in a world are not subject to it indefinitely, nor do they there fulfil all the stages of progress which they must go through in order to reach perfection. When they have reached the degree of advancement which that world permits, they pass on to another, more advanced world, and so on, until they reach the state of pure spirits. These worlds are as many stations, at each of which they find elements of progress commensurate with their advancement. To pass on to a world of a higher order is a reward to them, just as it is a punishment to prolong their stay in a wretched world, or to be relegated to one even more unhappy than the one they are obliged to leave when they are obstinately obstinate in evil.