AI-Driven Integration of Terrestrial and Non-Terrestrial Networks