Charged membranes under confinement induced by polymer-, salt-, or ionic liquid solutions