There is no "ecological paradox." Inference is specific to the unit of analysis. To take Robinson's (1950) analysis of 1930 US Census data as an example, it is true that:
- Individuals who reported being immigrants were slightly more likely to be illiterate (individual illiteracy and individual immigrant status were slightly positively correlated $r=0.12$); and
- States with a higher prevalence of illiteracy had a considerably lower prevalence of immigrants (state-level illiteracy and state-level immigrant status were moderately negatively correlated $r=-0.53$).
Robinson used these and similar relationships to make the case that extrapolating from relationships between populations (e.g. states) to individuals was a kind of logical fallacy, and he bestowed upon us the term ecological fallacy for describing such.
However, the opposite extrapolation—assuming that the relationships at the individual level must also apply at the population level—as also a logical fallacy... specifically the atomistic fallacy.
So how could both these relationships ($r=0.12$ for individuals and $r=-0.53$ for states) be true? Well... while individuals who were immigrants may have been more likely to be illiterate, states with high rates of immigration (e.g. New York) had the kind of services, and economic & cultural opportunity that drew in new immigrants. Coincidentally, "services and economic and cultural" opportunity tend to arise in commercial and industrial regional economies characterized by higher prevalence of literacy than, for example, in the agricultural heartland which was less an immigrant destination. Red/blue states' association with state affluence versus red/blue individuals' association with individual affluence raises precisely the same issue: the logical fallacy of extrapolating relationships at one level of inference onto another level of inference.
Incidentally, Robinsons' tacit assumption that individual relationships were the ones that really mattered (i.e. his focus on only the population to individual direction of fallacious inference) is itself a kind of psychologistic fallacy, as Diez-Roux (1998) and Subramanian, et al. (2009) make clear.
The tl;dr: statistical relationships are specific to the level of inference of their data and analysis. "'Why do some individuals have hypertension?' is a quite different question from 'Why do some populations have much hypertension, whilst in others it is rare?'"—Rose, 1985
References
Diez-Roux, A. V. (1998). Bringing context back into epidemiology: variables and fallacies in multilevel analysis. American Journal of Public Health, 88(2):216–222.
Robinson, W. (1950). Ecological correlation and the behavior of individuals. American Sociological Review, 15(3):351–357.
Rose, G. (1985). Sick individuals and sick populations. International Journal of Epidemiology, 14(1):32–28.
Subramanian, S. V., Jones, K., Kaddour, A., and Krieger, N. (2009). Revisit- ing Robinson: The perils of individualistic and ecologic fallacy. International Journal of Epidemiology, 38(2):342–360.