Structural relaxation of polymer nanospheres under soft and hard confinement: isobaric versus isochoric conditions.