Effect of compression on the molecular shape of polymer mushrooms with variable stiffness