I got an externally funded research grant as a lead researcher to carry out a project at a UK University, together with other senior co-PIs. The grant would pay my salary for the duration of the project as a postdoc, which would be 6 months. Due to several administrative and other issues, the project kept being delayed (outside of my control), by what the funding finished, but the project deliverables were not produced. I continued working on the project in the hope that we could finish it at some point, but other issues came up, preventing the project from being completed.
It has been now 4 months that I've been working as a postdoc in this project without any pay, and I can't continue living without any money to support myself. I got some legal advice from a lawyer about this where I was told I should just walk out since my contract finished and I have no obligation to work without a contract. However, being an ECR (early career researcher), it would be extremely damaging for my future career to abandon this project halfway and not get any publication from it.
After several meetings with the PIs discussing what to do with the project, and pointing out I need money to survive, their conclusion was that I must finish the project deliverables, without any further pay, as they are blaming me for the delays in the project (which is not the case, as I stated before). They are also threatening me (indirectly) with damaging my reputation as a scientist, blacklisting me for future grant applications (the senior PIs are in several grant committees in my area of research) and just in general destroying any chances of me having a future research career.
At this point, I have no idea what to do to get out of this problem... It seems my only options are either to quit academia entirely or accepting to being exploited and work without pay.
On top of all this, I discovered recently the grant has some small amount of leftover money from non needed consumables, which I requested to be redirected to my salary. The PIs refused this, as they are saying they will only pay me this amount if the project is finished.
I am looking for any advice on how to deal with this problem, particularly if someone else faced a similar situation before in a UK university.