Dynamics of gravitational instability excitation in viscoelastic polytropic fluids