We study the response of a trapped Bose-Einstein condensate to a sudden turn-on of a rotating drive by solving the two-dimensional Gross-Pitaevskii equation. A weakly anisotropic rotating potential excites a quadrupole shape oscillation and its time evolution is analyzed by the quasiparticle projection method. A simple recurrence oscillation of surface mode populations is broken in the quadrupole resonance region that depends on the trap anisotropy, causing stochastization of the dynamics. In the presence of the phenomenological dissipation, an initially irrotational condensate is found to undergo damped elliptic deformation followed by unstable surface ripple excitations, some of which develop into quantized vortices that eventually form a lattice. Recent experimental results on the vortex nucleation should be explained not only by the dynamical instability but also by the Landau instability; the latter is necessary for the vortices to penetrate into the condensate.