Physics-informed learning of complex systems with sparse data