The embryonic and fetal cells have a complex system to integrate nutritional signals from their environment and adapt their development (possible involvement in the prenatal programming of glucose metabolism in the adult) accordingly to ensure "survival". In the case of inborn errors of metabolism, nutrition in the first years of life is a key determinant of health or disease status. Additionally, the relationship between CVD factors (plasma lipid content) and gene-diet interaction could be an example of long-term consequences due to its heritability.
My contribution is less academic and more logical. The desired goal of a species is to procreate and so natural selection favours the selections which can be passed on. While long term health may boost the numbers of surviving offspring, all a genetic change requires for maintenance is short term survival up to reproductive age and a high fecundity rate.