The ESO nearby Abell cluster survey. VIII. Morphological and spectral classification of galaxies