We estimated the effect of community-level natural hazard exposure during prior developmental stages on later anxiety and depression symptoms among young adults and potential differences stratified by gender. We analyzed longitudinal data (2002–2020) on 5585 young adults between 19 and 26 years in Ethiopia, India, Peru, and Vietnam. A binary question identified community-level exposure, and psychometrically validated scales measured recent anxiety and depression symptoms. Young adults with three exposure histories (“time point 1,” “time point 2,” and “both time points”) were contrasted with their unexposed peers. We applied a longitudinal targeted minimum loss-based estimator with an ensemble of machine learning algorithms for estimation. Young adults living in exposed communities did not exhibit substantially different anxiety or depression symptoms from their unexposed peers, except for young women in Ethiopia who exhibited less anxiety symptoms (average causal effect [ACE] estimate = − 8.86 [95% CI: − 17.04, − 0.68] anxiety score). In this study, singular and repeated natural hazard exposures generally were not associated with later anxiety and depression symptoms. Further examination is needed to understand how distal natural hazard exposures affect lifelong mental health, which aspects of natural hazards are most salient, how disaster relief may modify symptoms, and gendered, age-specific, and contextual differences.