In this work we investigate the evolution of the X-ray emission of a cluster of single young massive stars with different metallicities. We have considered the X-ray contribution originated by the diffuse gas heated by the mechanical energy released by stellar winds and SN explosions as well as the X-ray contribution from SN remnants. The resulting ionizing spectrum (i.e. lambda < 912 Å) has been used to compute the expected intensity of the nebular He Ii lambda 4686 Å. The observational ratio He Ii/Hβ could be reproduced by the models assuming that a fraction of the mechanical energy produced by the star-formation episode is reprocessed by interaction with the ISM as soft X-ray radiation, contributing to the He ionization. However, the discreteness of the stellar populations affects the ionizing flux and may be responsible for the observed dispersion of the ratio. We have finally used the synthesis models to estimate the contribution of circumnuclear star-forming regions to the multiwavelength energy distribution in Active Galactic Nuclei, finding that the UV to soft X-ray continuum in many Seyfert 2 galaxies seems to be dominated by star-formation processes.