Early-time dynamics of actomyosin polarization in cells of confined shape in elastic matrices