The Shulchan Aruch (OC 433:10) rules that synagogues need to be checked for chametz prior to pesach as children sometimes bring in chametz.
The Mishna Berura there implies the obligation to check is on the "shamashim" (sextons) of the synagogues. He further notes that the sextons do not need to recite the nullification over the chametz in the synagogue as it does not belong to them, implying that the violation of owning chametz falls on the actuall owners of the chametz. He also rules that one may recite the blessing over the search when checking the synagogues.
The Aruch HaShulchan (OC 433:12) rules that this checking is not strictly necessary as any chametz left by the children in the synagogue is considered ownerless. As such, he says that no one would violate the prohibition of owning chametz. The sexton, he says, should check the synagogue but seemingly only out of the spirit-of-the-law, it not being nice to look at chametz in synagogue over pesach. The Aruch HaShulchan accordingly rules that no blessing is recited upon the search.