Excitonic polarons and core excitons: Dielectric relaxation and optical transitions