We aim to study the properties of the dense molecular gas towards the inner few 100 pc of four nearby starburst galaxies dominated both by photo dissociation regions (M82) and large-scale shocks (NGC253, IC342 and Maffei2), and to relate the chemical and physical properties of the molecular clouds with the evolutionary stage of the nuclear starbursts. We have carried out multi-transitional observations and analyses of three dense gas molecular tracers, CS, HC3N and CH3CCH, using Boltzmann diagrams in order to determine the rotational temperatures and column densities of the dense gas, and using a Large Velocity Gradients model to calculate the H2 density structure in the molecular clouds. The CS and HC3N data indicate the presence of density gradients in the molecular clouds, showing similar excitation conditions, and suggesting that they arise from the same gas components. In M82, CH3CCH has the highest fractional abundance determined in a extragalactic source (10^-8). The density and the chemical gradients found in all galaxies can be explained in the framework of the starburst evolution. The young shock-dominatedstarburst galaxies, like presumably Maffei2, show a cloud structure with a rather uniform density and chemical composition which suggests low star formation activity. Molecular clouds in galaxies with starburst in an intermediate stage of evolution, such as NGC253 and IC342, show clouds with a large density contrast (two orders of magnitude) between the denser regions (cores) and the less dense regions (halos) of the molecular clouds and relatively constant chemical abundance. Finally, the galaxy with the most evolved starburst, M82, has clouds with a rather uniform density structure, large envelopes of atomic/molecular gas subjected to UV photodissociating radiation from young star clusters, and very different chemical abundances of HC3N and CH3CCH.