Within the scope of sustainable development, integrating electric vehicles (EVs) and renewable energy sources (RESs) into power grids offers a number of benefits. These include reducing greenhouse gas emissions, diversifying energy sources, and promoting the use of green energy. Although the literature on hosting capacity (HC) models has grown, there is still a noticeable gap in the discussion of models that successfully handle transmission expansion planning (TEP), demand response (DR), and HC objectives simultaneously. Combining TEP, DR, and HC objectives in one model optimizes resource use, enhances grid stability, supports renewable and EV integration, and aligns with regulatory and market demands, resulting in a more efficient, reliable, and sustainable power system. This research presents an innovative two-layer HC model, including considerations for TEP and DR. The model determines the highest degree of load shifting appropriate for incorporation into power networks in the first layer. Meanwhile, the second layer focuses on augmenting the RES and EVs’ hosting capability and modernizing the network infrastructure. System operators can choose the best scenario to increase the penetration level of EVs and RESs with the aid of the proposed model. The proposed model, which is formulated as a multi-objective mixed-integer nonlinear optimization problem, uses a hierarchical optimization technique to identify effective solutions by combining the particle swarm optimization algorithm and the crayfish optimizer. When compared to traditional methods, the results obtained from implementing the proposed hierarchical optimization algorithm on the Garver network and the IEEE 24-bus system indicated how effective it is at solving the presented HC model. The case studies demonstrated that integrating DR into the HC problem reduced peak load by 10.4–23.25%. The findings also highlighted that DR did not impact the total energy consumed by EVs throughout the day, but it did reshape the timing of EV charging, creating more opportunities for integration during periods of high demand. Implementing DR reduced the number of projects needed and, in some cases, led to cost savings of up to 12.3%.