as I understand it, if the remaining directors cannot or will not purchase the shares and a suitable 3rd party cannot be found the company can be sold or assets of the company can be sold to the value of the bankrupts shares.
It would depend on the type of share, public or private companies, and the value. Also the company may have restrictions on who the holding can be sold to in their articles.
There may be a clause that means the shares can only be transferred to other shareholds or directors, and if no other director will buy them, they are offered to the company secretary. If they are unable or unwilling to buy them they are held by the Official Receiver or Trustee and they will claim any dividend payable.
If the shares are of no or little value, they will disclaim them.
As a share holder in the company the OR would have no powers to sell the company assets, the only thing they can do is sell the shares at public auction if there is likely to be sufficient interest. It really all depends on the value of the shares.