The answer depends on whether the company involved has 'limited liability'. Most, but not all public and listed companies and corporations have this, but not all so it is worth checking and understanding what you are getting involved with.
The expression 'limited liability' means that the owners (shareholders) of a company have a liability up to the amount of the face value of the shares they hold which they have not yet paid for. The difference is usually minor but basically it means that if you buy $10 of shares you have no liability, but if the company gives you $10 of shares, and you pay them (in cash or kind) $5, then you still have a liability of $5. If the company fails, the debtors can come after you for that liability.
An 'unlimited liability' company is a different animal altogether. Lloyds insurance is probably the most famous example. Lloyds worked by putting together consortiums to underwrite risk. If the risk doesn't happen, the consortium keeps the premiums, if it does, they cover the loss. Most of the time they are very profitable but not always. For example, the consortiums which covered asbestos caused the bankruptcies of a great many very wealthy people.