In this letter, we propose a task offloading framework for UAV-enabled MEC networks, where all smart mobile devices are scattered randomly following an arbitrary distribution. By exploiting the hovering and mobilizing capability of a UAV, task offloading service can be provided to the devices in all sub-areas of the network. To extend UAV operating time and associated network lifetime, we formulate an optimization problem to minimize the total energy consumption of the UAV through joint region partitioning and UAV trajectory scheduling. To solve it, we decompose it into two independent sub-problems, i.e., region partitioning and UAV trajectory optimization. For the first sub-problem, we model it as a semi-discrete optimal transport problem by considering the traffic balance among different sub-areas and propose an iterative algorithm to achieve the optimal solution. Then, the UAV trajectory optimization sub-problem is modeled as a traveling salesman problem to determine the shortest route. Simulation results show that the proposed scheme can significantly reduce the energy consumption of the UAV while achieving proper load balance.