I actually signed twice that I will not sue the company, and that I have no claims against them. Both times this was condition for receiving severance pay that was significantly higher than what was legally required. The "not suing" had exceptions: For example if I visited the office once more to return company property that was at my home, and I slipped on a slippery floor and broke a leg, I could still sue them for that. But as one employment lawyer told me "if you sign this, and then you find out there was a conspiracy in HR to get rid of all male employees, you won't be able to sue them anymore". I took that risk :-)
Your contractual relationship with the company may last longer than your employment. For example NDAs, generally keeping company secrets secret even without NDA, if you are asked to be a witness when the company is sued etc. But nobody can force you to add new contractual obligations.
So signing an NDA after leaving or signing a non-compete agreement after leaving is not on. Making it a condition for a voluntary severance payment or offering you payment in general for signing is legal.
Since you have to return company property anyway, I think they can ask you to sign that you returned it. They can ask you to sign that you received severance pay when you received it. They can ask you to sign that you know there is a non-compete in your contract, they cannot ask you to sign that this non-compete is enforcable (I hope you see the difference).
If they threaten to fire you if you don't sign things that you have to sign, you would be signing under duress and any court would throw it out.