The state’s official historical society has removed a painting that it said went awry of political campaign rules.