Recent interferometric observations have shown bright HCN emission from the nu2=1 vibrational state arising in buried nuclear regions of galaxies, indicating an efficient pumping of the nu2=1 state through absorption of 14 $mu$m continuum photons. We have modeled the continuum and HCN vibrational line emission in these regions, characterized by high column densities of dust and high luminosities, with a spherically symmetric approach, simulating both a central heating source (AGN) and a compact nuclear starburst (SB). We find that when the H2 columns become very high, N_{H2}>~10^{25} cm-2, trapping of continuum photons within the nuclear region dramatically enhances the dust temperature (Tdust) in the inner regions, even though the predicted spectral energy distribution as seen from outside becomes relatively cold. The models thus predict bright continuum at millimeter wavelengths for luminosity surface brightness (averaged over the model source) of ~10^{8} Lsun pc^{-2}. This {it greenhouse} effect significantly enhances the mean mid-infrared intensity within the dusty volume, populating the nu2=1 state to the extent that the HCN vibrational lines become optically thick. AGN models yield higher Tdust in the inner regions and higher peak (sub)millimeter continuum brightness than SB models, but similar HCN vibrational J=3-2 and 4-3 emission owing to both optical depth effects and a moderate impact of high tdust on these low-J lines. The observed HCN vibrational emission in several galaxies can be accounted for with a HCN abundance of ~10^{-6} (relative to H2) and luminosity surface brightness in the range (0.5-2)x10^{8}$ Lsun pc^{-2}, predicting a far-infrared photosphere with Tdust}~80-150 K --in agreement with the values inferred from far-infrared molecular absorption.