Breaking the agreement of an software company

Hello Sir/Madam, I have been working in an IT company for almost 3.5 years. In the month of March 2020, I have resigned my company as I received my visa to another country. But due to COVID-19 and flights cancellation, I have approached my company to take back my resignation. In return they have asked me to sign an agreement for not leaving the company for a year else I need to pay 3.5lakhs. The agreement says that they have invested me in my training that costed them 5 lakhs and I need to pay 3.5L if I leave the company before the time. As I have EMIs to pay and family to feed, out of unemployment fear, I had to sign that agreement at that point and told them that I will be needing to travel abroad for a month around July and avoid my obtained visa cancellation. They agreed to it and have taken my sign on the document. In July, I came abroad and again due to COVID-19, my visa formalities and confirmation took more time than expected, which resulted in my financial problems. At one point I couldn't able to pay my bills abroad. I thought of getting another job just to support myself during my time abroad and asked my organization if I can work an additional job. But they told me tender my resignation as working on dual employment is against HR policies. With no option left, I gave my resignation and started working in my new job abroad for which the pay is very little. Now my Indian company is threatening me to file a legal action against me nd will intimate my current employer if I don't pay the 3.5lakhs. Few things to call out here: 1. The agreement is not prepared on the stamp paper and it doesn't have the witness signatures at the bottom. 2. The training was given to all employees in my team and they have not spent 5lakhs just on me seperately. After providing the training I have already worked for almost 6 months before they drafted this agreement. 3. They asked me to tender my resignation as dual employment is not allowed based on hr policies. I haven't myself resigned. 4. My company is registered under shops and establishment act. Please help me how this ends if they proceed with the legal action against me. I am not in a position to pay the amount to them a d I tried convincing them about the same nd they are threatening me now. Please suggest. Thank you.