With the rapid development of connecting massive devices to the Internet, especially for remote areas without cellular network infrastructures, space-air-ground integrated networks (SAGINs) emerge and offload computation-intensive tasks. In this paper, we consider a SAGIN, where multiple low-earth-orbit (LEO) satellites providing connections to the cloud server, an unmanned aerial vehicle (UAV), and nearby base stations (BSs) providing edge computing services are included. The UAV flies along a fixed trajectory to collect tasks generated by Internet of Things (IoT) devices, and forwards these tasks to a BS or the cloud server for further processing. To facilitate efficient processing, the UAV needs to decide where to offload as well as the proportion of offloaded tasks. However, in practice, due to the variability of environment and actual demand, the amount of arrival tasks is uncertain. If the deterministic optimization is utilized to develop offloading strategy, unnecessary system overhead or higher task drop rate may occur, which severely damages the system robustness. To address this issue, we characterize the uncertainty with a data-driven approach, and formulate a distributionally robust optimization problem to minimize the expected energy-constrained system latency under the worst-case probability distribution. Furthermore, the distributionally robust latency optimization algorithm is proposed to reach the sub-optimal solution. Finally, we perform simulations on the real-world data set, and compare with other benchmark schemes to verify the efficiency and robustness of our proposed algorithm.