In this study, a direct load control strategy for procuring flexibility from residential heating, ventilation, and air conditioning (HVAC) units and the optimal management of shared energy storage systems connected at different buses of a distribution system is proposed, as a new contribution with respect to earlier studies, aiming to minimize the energy demand during DR event periods. Moreover, an additional objective related to the minimization of the end-users' discomfort induced by the interruption of the HVAC units is considered, leading to the formulation of a bi-level optimization problem based on a second-order conic programming representation of the AC power flow equations. The effectiveness of the proposed methodology is demonstra...