The assumption of constant population size is central in population genetics. It led to a large body of results, which have proven successful to understand evolutionary dynamics. Part of this success is due to their robustness to modeling choices. On the other hand, allele frequencies and population size are both determined by the interaction between a population and the environment. Including explicitly the demographic factors and life-history traits that determine the eco-evolutionary dynamics makes the analysis difficult and the results dependent on model details. Here, we develop a framework that encompasses a great variety of systems with arbitrary population dynamics and competition between species. By using techniques based on scale separation for stochastic processes, we are able to compute evolutionary properties, such as the invasion probability. Remarkably, these properties assume a universal form with respect to our framework, which depends on only three life-history traits related to the exponential fitness, the invasion fitness, and the carrying capacity of the alleles. In other words, different systems, such as Lotka-Volterra or a chemostat model, share the same evolutionary outcomes after the correct remapping of the parameters of the models into three effective life-history traits. An important and surprising consequence of our results is that the direction of selection can be inverted, with a population evolving to reach lower values of fitness. This can happen because the obtained frequency-dependent noise (affected by the three life-history traits) can generate an effective force that counterbalance classical selection.