Urbanization promotes economy, mobility, access, and availability of resources, but on the other hand, generates higher levels of pollution, violence, crime, and mental distress. The health consequences of the agglomeration of people living close together are not fully understood. Particularly, it remains unclear how variations in the population size across cities impact the health of the population. We analyze the deviations from linearity of the scaling of several health-related quantities, such as the incidence and mortality of diseases, external causes of death, wellbeing, and health care availability, in respect to the population size of cities in Brazil, Sweden, and the USA. We find that deaths by non-communicable diseases tend to be relatively less common in larger cities, whereas the per capita incidence of infectious diseases is relatively larger for increasing population size. Healthier lifestyle and availability of medical support are disproportionally higher in larger cities. The results are connected with the optimization of human and physical resources and with the non-linear effects of social networks in larger populations. An urban advantage in terms of health is not evident, and using rates as indicators to compare cities with different population sizes may be insufficient.