Extremely irradiated, close-in planets to early-type stars might be prone to strong atmospheric escape. We review the literature showing that X-ray-to-optical measurements indicate that for intermediate-mass stars (IMS) cooler than $approx$8250 K, the X-ray and EUV (XUV) fluxes are on average significantly higher than those of solar-like stars, while for hotter IMS, because of the lack of surface convection, it is the opposite. We construct spectral energy distributions for prototypical IMS, comparing them to solar. The XUV fluxes relevant for upper planet atmospheric heating are highest for the cooler IMS and lowest for the hotter IMS, while the UV fluxes increase with increasing stellar temperature. We quantify the influence of this characteristic of the stellar fluxes on the mass loss of close-in planets by simulating the atmospheres of planets orbiting EUV-bright (WASP-33) and EUV-faint (KELT-9) A-type stars. For KELT-9b, we find that atmospheric expansion caused by heating due to absorption of the stellar UV and optical light drives mass-loss rates of $approx$10$^{11}$ g s$^{-1}$, while heating caused by absorption of the stellar XUV radiation leads to mass-loss rates of $approx$10$^{10}$ g s$^{-1}$, thus underestimating mass loss. For WASP-33b, the high XUV stellar fluxes lead to mass-loss rates of $approx$10$^{11}$ g s$^{-1}$. Even higher mass-loss rates are possible for less massive planets orbiting EUV-bright IMS. We argue that it is the weak XUV stellar emission, combined with a relatively high planetary mass, which limit planetary mass-loss rates, to allow the prolonged existence of KELT-9-like systems.