Polarized dust emission of magnetized molecular cloud cores