Holmes seems to be referring here to 'the work ethic' which will eventually lead to the hardest most virtuous workers getting on in life and improving their social situation. This has relevance to a pioneering American society where the just rewards of the hard work of a self made man are represented in wealth and a comfortable life. The 'stately mansions' oddly seems to represent not only the value of learning, of education for its own sake, but also the getting of wisdom and integrity and prosperity. The phrase is reminiscent of 'in my father's house there are many mansions' from the New Testament. We should leave lowly earthly pursuits behind in favour of more heavenly aspirations as if we are casting off a mortal coil or shell. The nautilus keeps shedding the things it has grown out of. Sadly this seems also to refer to relationships! which are only kept on so the individual can look down on people - or back at how the superior 'he' has come.