Assuming you cannot prove who left the plug loose its not necessarily time to panic. If you shut the engine down as soon as the light came on OR if you were not going too fast when it did the engine is probably repairable.
More than likely it is the crankshaft and bearings, the upper portion, pistons, heads, valves etc probably OK.
You need to find someone you can trust and who knows what he is doing and have him give you an opinion. The key to any damage is how you were driving at the time and how fast you shut down.
Your best bet at holding someone else liable would be whoever did the last oil change, if you have records to show that.
Otherwise, you're SOL.
So in court when the judge asks you to prove no one has touched the drain plug since you took ownership ,,,, how will you answer him ?
Get my drift ?
You are on your own here and unless the dealership is giving out gifts of cash and engines you will be paying for this yourself .
I bought a vehicle april 2nd, 2009 BMW 528. It came with 100,000 miles because of that the dealer says there is no warranty. One day I was driving less than a week after receiving it. I heard a sound that sound like a nice turbo. Then my oil light came on. park at my friend house and then came out start the car said there was no oil do not drive. I look under saw all the oil leaking out. Towed it to my home. Sat for a week then to my mechanic. Said the drain plug came out. Whoever did the oi last did not tighten the plug well. then after some more investigation they said the engine is gone. How do I get the dealer to take blame. It is a Nissan Dealership. not some small lot. This car is worth 20,000. I now need a new engine which cost 6000 with labor my mechanic said.