In the concluding paragraphs of Candide, is Voltaire recommending retreating from social commitment?
Candide is a parody (a form of satire, making fun of an idea...) of Gottfried Wilhelm von Leibnitz and his philosophy that focused on optimism, mirrored in Pangloss' continual (and well-known) references to:
this best of all possible worlds.
More than anything, I believe Voltaire wishes people to be more realistic, and grounded rather than having a "head-in-the-clouds" attitude. Throughout the story, the most unrealistic and horrific events take place—leading to much suffering by Candide, Pangloss, and those they know and/or care about—and still Candide and Pangloss see the world with "rose-colored" glasses. However, as the story nears its end, Candide begins to question this philosophy.
Eventually Candide buys a farm where he and the other characters live. Advice from a kindly and neighboring Turk provides the turning point of Candide's personal philosophy—the Turk suggests that farming keeps one from life's vices:
I have only twenty acres of land...which my children and I cultivate. Our work keeps us free of three great evils: boredom, vice and poverty.
Candide changes his philosophy, greatly influenced by the Turk's words; and his outlook on life changes from "this best of all possible worlds" to "we must cultivate our garden."
In this the once easily-influenced Candide states that life is about avoiding vice, and paying attention to the things that matter most in life: being grounded in family and/or community, and making things grow; for there is only goodness in these things, and these are not the empty dreams of the eternal optimists.
Perhaps Voltaire is saying that "cultivation" is the better part of the bargain in life, as opposed to empty optimism. It is in the "cultivating" of the garden that the author presents his philosophy that in doing so, mankind shows an honest and sincere social commitment that creates results rather than intangibles, ideas, as suggested in von Leibnitz's philosophy.
Voltaire is not recommending a retreat from social commitment but is reframing how individuals can be best committed and active in their societies. Candide learns through all his travels that engaging in the wider world does not work out well for most people. Despite Pangloss's philosophy that all is for the best in the best of all possible worlds, Candide learns that this world is a cruel, treacherous place.
Near the end of his story, two events juxtapose themselves in his mind. First, he dines with six dethroned kings, and then he dines with a Turk who can offer him a fine feast:
Having said these words, he invited the strangers into his house; his two sons and two daughters presented them with several sorts of sherbet, which they made themselves, with Kaimak enriched with the candied-peel of citrons, with oranges, lemons, pine-apples, pistachio-nuts, and Mocha coffee unadulterated with the bad coffee of Batavia or the American islands.
When Candide mentions to the Turk that he must be very wealthy, the Turk says no; he cultivates only a few acres and lives simply and apart from the grand affairs of the world.
Candide, weighing what he has seen, decides he would rather be the Turk than one of the six kings. He and his companions reunite and live in retirement, cultivating their gardens and talents on a small piece of land. This is not so much a retreat from social commitment as it is a retreat from pursuing fame, glory, or grandeur—and a retreat from grand philosophical systems. The group focuses on supporting and nurturing each other and developing their own talents. This, Voltaire suggests, is preferable and more beneficial to society that trying to grab power or be "great" in the world.