On subjecting a bulk 2H-PbI2 crystal to vacuum annealing at 500 K followed by a sudden cooling at liquid nitrogen temperature stacking faults are generated that separate distinct layers of nanometric thickness in which different numbers of I-Pb-I atomic layers are bundled together. Such structures, containing two, three, four, five etc I-Pb-I atomic layers, behave as quantum wells of different widths. The signature of such a transformation is given by a shift towards higher energies of the fundamental absorption edge, which is experimentally revealed by specific anisotropies in the photoluminescence and Raman spectra. The quantum confining effect is made visible by specific variations of a wide extra-excitonic band (G) at 2.06 eV that originates in the radiative recombination of carriers (electrons and holes), trapped on the surface defects. The excitation spectrum of the G band, with p polarized exciting light, reveals a fine structure comprised of narrow bands at 2.75, 2.64, 2.59 and 2.56 eV, which are associated with the PbI2 quantum wells formed from two, three, four and five I-Pb-I atomic layers of 0.7 nm thickness. Regardless of the polarization state of the laser exciting light of 514.5 nm (2.41 eV), which is close to the band gap energy of PbI2 (2.52 eV), the Raman scattering on bulk as-grown PbI2 crystals has the character of a resonant process. For p polarized exciting light, the Raman scattering process on vacuum annealed PbI2 becomes non-resonant. This originates from the quantum well structures generated inside the crystal, whose band gap energies are higher than the energy of the exciting light.