The collapse of a vapour bubble over a material surface has been widely studied over the past few decades, but a comprehensive and quantitative analysis of the cavitation dynamics and its effects on solid materials at the mesoscale (nanometre up to micrometre), which would be of particular interest in applications exploiting cavitation power, is still lacking. In this work, we adopt a diffuse interface model to describe the microbubble dynamics, and a dynamic plasticity model for the solid. The former is particularly suited to studying the rich phenomenology characterising bubble collapse at the mesoscale, which comprises transitions to supercritical conditions, emission and propagation of shock waves, generation of liquid microjets and topological transitions, whereas the latter is used to characterise the permanent plastic deformation caused by the bubble collapse, and has been augmented to consider inertial effects, to assess whether or not an interaction between elastic and plastic waves may influence the resulting deformation. Results concerning the collapse of a microbubble at different liquid overpressures and initial standoff ratios are discussed, and the elastoplastic wave propagation in the solid, together with plastic deformation, is studied for different cases, depending on elastic and plastic material parameters.