Liability can change depending on the status of the rideshare driver:
The driver is transporting a rider: In this case, the rideshare company will offer up to 1 million dollars in liability coverage. You can pursue a claim through the rideshare company's insurance policy, and payouts can apply to more than one party.
The driver is actively seeking a rider:  In this case, you may still be able to tap into Uber and Lyft insurance coverage, but the amounts drop to a maximum of $50,000 per person, $100,000 per accident in bodily injury coverage, and up to $25,000 in property damage coverage
The driver is not on the rideshare app: You won't have the ability to tap into insurance coverage offered by the rideshare company if they are not logged in and actively using the app. The injured individual or passenger will have to rely on their PIP insurance or personal health insurance.
In all cases, you may still be able to pursue additional legal actions such as a personal injury lawsuit. However, these claims will typically be aimed at the driver and any other third parties,  not the rideshare companies. Because rideshare drivers are contracted workers and not employees, it has been notoriously difficult to hold rideshare companies liable for an accident caused by one of their drivers.