P/E is the number of years it would take for the company to earn its share price. You take share price divided by annual earnings per share. You can take the current reported quarterly earnings per share times 4, you can take the sum of the past four actual quarters earnings per share or you can take some projected earnings per share.
It has little to do with a company's actual finances apart from the earnings per share. It doesn't say much about the health of a company's balance sheet, and is definitely not an indicator for bankruptcy. It's mostly a measure of the market's assumptions of the company's ability to grow earnings or maintain it's current earnings growth.
A share price of $40 trading for a P/E ratio of 10 means it will take the company 10 years to earn $40 per share, it means there's current annual earnings per share of $4. A different company may also be earning $4 per share but trade at 100 times earnings for a share price of $400. By this measure alone neither company is more or less healthy than the other. One just commands more faith in the future growth from the market.
To circle back to your question regarding a negative P/E, a negative P/E ratio means the company is reporting negative earnings (running at a loss). Again, this may or may not indicate an imminent bankruptcy. Increasing balance sheet debt with decreasing revenue and or earnings and or balance sheet assets will be a better way to assess bankruptcy risk.