A large collection of equations of state (EOSs) built within the covariant density functional theory of hadronic matter and allowing for density dependent couplings is employed to study polar $f$- and $p$-oscillations of cold and hot compact stars. Correlations between oscillation frequencies of cold purely nucleonic neutron stars (NSs), their global parameters as well as properties of nuclear matter (NM) are investigated by considering a set of models from Beznogov and Raduta, [Phys. Rev. C 107, 045803 (2023)], where a number of constraints on the saturation properties of NM, pure neutron matter and the lower bound of the maximal NS mass were imposed within a Bayesian framework. The roles of finite temperature and exotic particle degrees of freedom, e.g., hyperons, $\mathrm{\ensuremath{\Delta}}$-resonances, antikaon condensates or a hadron to quark phase transition, are addressed by employing a family of models publicly available on compose and assuming idealized profiles of temperature or entropy per baryon and charge fraction. We find that finite temperature effects reduce the oscillation frequencies of nucleonic stars while the opposite effect is obtained for stars with exotic particle degrees of freedom. When the $\mathrm{\ensuremath{\Gamma}}$-law is employed to build finite temperature EOSs, errors in estimating oscillation modes frequencies are of the order of 10% to 30%, depending on the mass. Throughout this work the Cowling approximation is used.