We study the emission power spectrum of a molecular emitter with multiple vibrational modes in the framework of macroscopic quantum electrodynamics. The theory we present is general for a molecular spontaneous emission spectrum in the presence of arbitrary inhomogeneous, dispersive, and absorbing media. Moreover, the theory shows that the molecular emission power spectra can be decomposed into the electromagnetic environment factor and lineshape function. In order to demonstrate the validity of the theory, we investigate the lineshape function in two limits. In the incoherent limit (single molecules in a vacuum), the lineshape function exactly corresponds to the Franck-Condon principle. In the coherent limit (single molecules strongly coupled with single polaritons or photons) together with the condition of high vibrational frequency, the lineshape function exhibits a Rabi splitting, the spacing of which is exactly the same as the magnitude of exciton-photon coupling estimated by our previous theory [S. Wang et al., J. Chem. Phys. 151, 014105 (2019)]. Finally, we explore the influence of exciton-photon and electron-phonon interactions on the lineshape function of a single molecule in a cavity. The theory shows that the vibronic structure of the lineshape function does not always disappear as the exciton-photon coupling increases, and it is related to the loss of a dielectric environment.