By combining information communication technology with power grid, the smart grid-oriented Power Internet of Things (PIoT) has become a critical technology to guarantee the safe and reliable power grid operation and improve system energy efficiency. Nevertheless, PIoT devices have only limited communication and computing resources since they are mostly deployed in remote areas that may be out of service coverage of existing terrestrial 5G networks. To overcome the resource limitation, we leverage Air-Ground Integrated C-NOMA Heterogeneous PIoT Networks (PAGIC HetNets), and study the core challenges in PAGIC HetNets. As PIoT devices are normally powered by battery, we aim at minimizing the energy consumption of PIoT devices and thoroughly investigate the problem of task offloading and resource allocation with minimal energy consumption. This problem belongs to a mixed integer nonlinear programming (MINLP) with extra difficulty that the long-term queuing delay and short-term constraints are coupled. To tackle the difficulty, we use Lyapunov optimization to transform this hard problem into three subproblems. The first subproblem is task splitting and local computing resource assignment at the PAGIC user side, which we solve with the Lagrangian multiplier method. The second subproblem is queue-aware channel reusing, and matching theory is adopted to solve it. The third subproblem is optimizing the aerial server resource allocation, for which we propose a greedy-based solution. Numerical simulations demonstrate that our approach can obtain excellent performance in terms of energy consumption, spectrum efficiency, task backlog, and queuing delay with lower complexity compared with several benchmark methods.