I'm in no way a lawyer, and this is something that you should consult a lawyer for, in terms of actual wording in your agreements/contracts...
The ability to license a work belongs to whoever owns the copyright of that work. Where the startup is the owner of that work, it has the ability to offer it to other's under a license (in the same way that I can license software that I write to others).
Such a clause would probably write like this (again, this is probably not legally strong):
Dissolution of Company - Distribution of Assets
In the event that the Company is dissolved and its activities are terminated, all software owned by the Company shall be released and made available under the terms and conditions of the MIT license.
There are two issues that I see:
A party would likely have to be designated to be allowed to enforce copyright infringements by other parties. This probably won't be an issue for something like the MIT license, but it may be an issue for others if you license it under something like the GPL license, which has strong copyleft provisions. If this is something that you don't care about enforcing (aka, you don't have the resources, or you want anybody to use it almost as they wish), I would say just release it under MIT and be done with it. GPL would confuse things here.
Re-ownership of Software
This isn't so much an issue as it is a weird thing. If your startup decides to restart, then you have two options depending on choice of license. More "liberal" licenses such as MIT would be easy to deal with: you just take the software and no issues. With something like the GPL, you'd most likely have to follow those terms, but then there wouldn't be anyone to legally enforce it, so the issue kind of becomes moot.
I'm not aware of any judicial precedent for this, and I don't really see reason for one. Cases would only be going to court if the issue was severe, and if the failed startup was interested in enforcing license of provisions, which I imagine would be rare. Any other issues I imagine would be issues with the license involved, and not with this publication scheme.
All this said, be sure to ask a lawyer. They are the only ones able to give you proper legal advice.