The competition between chemical equilibrium, for example protonation, and physical interactions determines the molecular organization and functionality of biological and synthetic systems. Charge regulation by displacement of acid-base equilibrium induced by changes in the local environment provides a feedback mechanism that controls the balance between electrostatic, van der Waals, steric interactions and molecular organization. Which strategies do responsive systems follow to globally optimize chemical equilibrium and physical interactions? We address this question by theoretically studying model layers of end-grafted polyacids. These layers spontaneously form self-assembled aggregates, presenting domains of controlled local pH and whose morphologies can be manipulated by the composition of the solution in contact with the film. Charge regulation stabilizes micellar domains over a wide range of pH by reducing the local charge in the aggregate at the cost of chemical free energy and gaining in hydrophobic interactions. This balance determines the boundaries between different aggregate morphologies. We show that a qualitatively new form of organization arises from the coupling between physical interactions and protonation equilibrium. This optimization strategy presents itself with polyelectrolytes coexisting in two different and well-defined protonation states. Our results underline the need of considering the coupling between chemical equilibrium and physical interactions due to their highly nonadditive behavior. The predictions provide guidelines for the creation of responsive polymer layers presenting self-organized patterns with functional properties and they give insights for the understanding of competing interactions in highly inhomogeneous and constrained environments such as those relevant in nanotechnology and those responsible for biological cells function.aggregates | charge regulation | local pH | responsive surfaces T he competition between physical interactions and chemical equilibrium is a challenging problem in physics, chemistry, and biology. A ubiquitous example of this competition in synthetic and life systems is the control of the charge state by protonation that regulates enzymatic activity (1), switches ionconductivity in biological (2) and synthetic channels (3), induces self-assembly (4-7), and determines the properties of technologically important polyelectrolyte layers (8, 9). These processes occur in confined inhomogeneous environments, where molecular organization is restricted and competition among interactions is augmented. The optimization of charge state by protonation depends not only on the solution pH but also on the local environment (10, 11). Therefore, it is imperative to understand whether the molecular organization is determined by the independent optimization of the acid-base equilibrium and the physical interactions, or if there are phenomena that arise exclusively from their coupling. This understanding is particularly relevant today given the large number of systems...