Species-rich communities, such as the microbiota or environmental microbial assemblages, provide key functions for human health and ecological resilience. Increasing effort is being dedicated to design experimental protocols for selecting community-level functions of interest. These experiments typically involve selection acting on populations of communities, each of which is composed of multiple species. Numerical explorations allowed to link the evolutionary dynamics to the multiple parameters involved in this complex, multi-scale evolutionary process. However, a comprehensive theoretical understanding of artificial selection of communities is still lacking. Here, we propose a general model for the evolutionary dynamics of species-rich communities, each described by disordered generalized Lotka-Volterra equations, that we study analytically and by numerical simulations. Our results reveal that a generic response to selection for larger total community abundance is the emergence of an isolated eigenvalue of the interaction matrix that can be understood as an effective cross-feeding term. In this way, selection imprints a structure on the community, which results in a global increase of both the level of mutualism and the diversity of interactions. Our approach moreover allows to disentangle the role of intraspecific competition, interspecific interactions symmetry and number of selected communities in the evolutionary process, and can thus be used as a guidance in optimizing artificial selection protocols.