Note that genetics are not 100% in control, and the conditions of the pregnancy affect the outcome of the pregnancy. We don't know the full effects of this, and we certainly don't know which aspects of it are from the womb specifically vs other biological aspects of the mother (e.g. blood chemistry). Health of the mother certainly has correlations with birth weight and developmental progress, but the extent & mechanisms are still pretty opaque.