On the importance of structural identifiability for machine learning with partially observed dynamical systems