The combination of internet of things (IoT), 5G, and power line communication (PLC) provides real-time and low-cost data transmission services to meet the quality of service (QoS) requirements for distribution grid energy dispatch. However, the IoT-empowered communication resource management system faces challenges in optimizing delay and traffic cost for distribution grid energy dispatch. There is a contradiction between the long-term performance guarantee and short-term optimization objectives, compounded by competition for communication resources. In this paper, we construct the minimization problem of the weighted sum of data transmission delay and traffic cost. Utilizing Lyapunov optimization, we aim to decouple the long-term constraint of average queuing delay with the short-term optimization objective. Then, a delay and cost-balanced communication resource management algorithm based on two-layer iterative matching is proposed. It optimizes the communication mode selection by I-to-2 bidding matching in a large timescale and subchannel allocation by many-to-many deferred acceptance matching in a small timescale. The simulation data present that the proposed algorithm excels in reducing data transmission delay, minimizing traffic cost, and decreasing queuing delay.