Osmotic pressure confines and decreases the lamellar distance between membranes in a stack and may also change the phase or structure of lipid bilayers. Using solution X-ray scattering, we determined the structure and interactions of saturated (DLPS) and unsaturated (DOPS) charged lipids under osmotic stress, generated by osmolyte solutions consisting of polyethylene glycol (PEG), NaCl, or the ionic liquid EMIES. The measured pressure-distance curves were fit to the theoretical free energy of charged liquid membranes that included numerical solutions of the Poisson-Boltzmann theory, modified to account for nonelectrostatic interactions between counterions and the surface and between lipid molecules on the surface. Charged membranes exhibit a non-ideal swelling behaviour that is consistent with partial melting of the lamellar phase into a coexisting, disordered phase. The disordered phase applies an osmotic stress to the lamellar phase and decreases the spacing between bilayers in the lamellar phase. We showed that in pure water, the pressure of the disordered phase increased with the lipid volume fraction or temperature. Addition of osmolytes reduced the lamellar spacing. The numerical solutions that fit the data showed that at the critical osmolyte concentration, a small, sharp drop in the water spacing between bilayers is expected owing to massive adsorption of the counterions onto the membrane. The adsorption increases with the osmolyte concentration, and is accompanied by a lateral phase separation into domains of neutral (counterion adsorbing) and charged (non-adsorbing) lipid molecules. In the case of the ionic liquid, this transition was followed by a liquid-to-crystal phase transition of the bilayers. With NaCl the transition to the crystal phase required a significantly higher osmolyte concentration. In the crystal phase that was induced by the ionic liquid, the lipid molecules were more tilted than in the crystal phase formed by NaCl. A further increase of the ionic liquid concentration melted the lipid crystal phase into the gel phase.