Tolstoy is using Pierre as a mouthpiece for the sort of philosophical questions that he himself struggled with all his life. At this point Pierre is an example of the superfluous man.
In Russian nineteenth century literature, the 'superfluous man' developed as an important literary figure. Superfluous men struggled to find a place in life, or a point to their existence. They are idealists, incapable of decisive action, and are instead given to much Romantic moping and philosophical musing. The earliest example in Russian literature was Pushkin's Eugene Onegin; Turgenev went on to make the form explicit in his Diary of a Superfluous Man. Ivan Goncharov took the idea to extremes in Oblomov, when he created a character so passive and superfluous it takes him about fifty pages to get out of bed. There is a political as well as a psychological point behind the superfluous man, which is to question the health of a society that turns young, intelligent men into useless outcasts. The superfluous men are the ancestors of the angry, radical intelligentsia who appear in later literature. Turgenev's Bazarov in Fathers and Sons can be seen as a kind of hybrid between these two types.