It’s funny that, although evolution kind of screwed us over by giving babies heads that are proportionally larger than the woman’s hips (and our species suffered many deaths as a result of failed births), if the evolution of the frontal lobe had not progressed to the point that it had, which was the sole cause of the expansion of head size, we almost certainly would not have had the intellectual and/or organizational capacity to develop modern medical technologies, which save countless lives including the lives of millions of babies in the present day who would have otherwise died.
Is it quantifiably better that this development occurred? In terms of quality of life and the exploration of human capacity, including but not limited to abstract thought and imagination enabling us to simulate realities in our brains before manifesting our ideas in tangible reality, allowing us in turn to develop ideal living environments, yes. But, have more lives been saved utilizing the fruits of our imaginations than were taken due to the increase in head size? Difficult to quantify.
The below table attempts to estimate the total number of humans who have ever lived, the exact number clearly impossible to obtain due to the fact that there was no first individual human and the emergence of homo sapiens was a gradual process.
One must also consider the possibility that early homo sapiens may have died off if not for the population’s growing frontal lobes. Something to think about.