Line a wide-mouth, 2- to 3-cup noncorrosive container with two smooth layers of cheesecloth or a clean, dry muslin or linen towel. In a bowl, beat the cheese with an electric mixer on medium speed until soft and spreadable.
Press a fourth of the cheese evenly over bottom of container. Spread a third of the pesto evenly over cheese to edges of container. Repeat steps to layer remaining cheese and pesto, ending with cheese. Fold edges of cloth over cheese and press gently to compact. Cover airtight and chill until firm, at least 1 hour or up to 1 day.
Fold back cloth; invert a plate over torta and then, holding plate and container together, invert torta onto plate. Peel off cloth. If desired, garnish with cilantro sprigs. Serve with baguette slices.