As an emerging network paradigm, the space–air–ground integrated network (SAGIN) has garnered attention from academia and industry. That is because SAGIN can implement seamless global coverage and connections among electronic devices in space, air, and ground spaces. Additionally, the shortage of computing and storage resources in mobile devices greatly impacts the quality of experiences for intelligent applications. Hence, we plan to integrate SAGIN as an abundant resource pool into mobile edge computing environments (MECs). To facilitate efficient processing, we need to solve the optimal task offloading decisions. In contrast to existing MEC task offloading solutions, we have to face some new challenges, such as the fluctuation of processing capabilities for edge computing nodes, the uncertainty of transmission latency caused by heterogeneous network protocols, the uncertain amount of uploaded tasks during a period, and so on. In this paper, we first describe the task offloading decision problem in environments characterized by these new challenges. However, we cannot use standard robust optimization and stochastic optimization methods to obtain optimal results under uncertain network environments. In this paper, we propose the ‘condition value at risk-aware distributionally robust optimization’ algorithm for task offloading, denoted as RADROO, to solve the task offloading decision problem. RADROO combines the distributionally robust optimization and the condition value at risk model to achieve optimal results. We evaluated our approach in simulated SAGIN environments, considering confidence intervals, the number of mobile task offloading instances, and various parameters. We compare our proposed RADROO algorithm with state-of-the-art algorithms, such as the standard robust optimization algorithm, the stochastic optimization algorithm, the DRO algorithm, and the Brute algorithm. The experimental results show that RADROO can achieve a sub-optimal mobile task offloading decision. Overall, RADROO is more robust than others to the new challenges mentioned above in SAGIN.