Quantum wells and deep impurity levels under hydrostatic pressure