Hi,
It seems that there is an investment from Comanies Y and Z. By investment, I understand that the investment may be in the form of equity shares (though other forms of investments like CCD/ OCDs, CCPS/ OCPS etc. may be possible). The terms of the investment are governed by the Shareholders Agreement ("SHA"). In the event SHA has not been signed, then Companies X and Z are entitled to their rights and duties under the Companies Act, 2013.
In this case, the representatives of the said companies have resigned. This is different from them not being shareholders. They still have their rights and duties as shareholders. Therefore, in this case, they continue as shareholders and their rights continue.
I understand that the instance of them resigning as directors would be because of the accompanying liabilities arising from loan default. Depending the persons' role in the Company they may or may not be liable. They would prima facie not be liable for any default post their resignation. However, as stated above, this does not erode their rights and duties as shareholders.
Regards,