When a case was lodged due to an accident, which happened after the expiration of insurance, then the owner of the vehicle alone is liable to pay the compensation.
When the name of you come in the RC book, from that date on wards you become the owner of the vehicle and you should liable from that date.
If you are interested to purchase the vehicle then you can. When you change the ownership of the vehicle, then you will take insurance in your name. For changing the name submit your address proof, transfer form and NOC from bank.
Please note that no second hand car buyer will buy a non-insured car so as a owner its dealer (present seller )responsibility to get it insured first .With no insurance there cannot be a transfer at the RTO.