Metabolic scaling theory has been pivotal in formalizing the expected energy expenditures across populations as a function of body size. Coexistence theory has provided a mathematization of the environmental conditions compatible with multispecies coexistence. Yet, it has been challenging to explain how observed community-wide patterns, such as the inverse relationship between population abundance density and body size, can be unified under both theories. Here, we provide the foundation for a tractable, scalable, and extendable framework to study the coexistence of resource-mediated competing populations as a function of their body size. For a given thermal domain and response, this integration reveals that the metabolically predicted 1/4 power dependence of carrying capacity of biomass density on body size can be understood as the average distribution of carrying capacities across feasible environmental conditions, especially for large communities. In line with empirical observations, our integration predicts that such average distribution leads to communities in which population biomass densities at equilibrium are independent from body size, and consequently, population abundance densities are inversely related to body size. This integration opens new opportunities to increase our understanding of how metabolic scaling relationships at the population level can shape processes at the community level under changing environments.