Section 53. If a town, regional school district, or a district as defined in section one A, or any of its officers or agents are about to raise or expend money or incur obligations purporting to bind said town, regional school district, or district for any purpose or object or in any manner other than that for and in which such town, regional school district, or district has the legal and constitutional right and power to raise or expend money or incur obligations, the supreme judicial or superior court may, upon petition of not less than ten taxable inhabitants of the town, or not less than ten taxable inhabitants of any town in the regional school district, or not less than ten taxable inhabitants of that portion of a town which is in the district, determine the same in equity, and may, before the final determination of the cause, restrain the unlawful exercise or abuse of such corporate power.