Hello Ben,
Sorry about your loss
The short answer is I don't know ! But here are some possible causes which you might consider. I am assuming your tank has cycled and has been established for a while as you say they lived for a while before dying one by one. So I won't go down the ammonia/nitrite path.
Firstly your Loaches might be being bullied by either the Plecs or your Rainbow Shark (the latter will certainly chase them). Does your tank have a lot of cover such as Bogwood, pipes, rocks, plant pots or plants? Loaches require hiding places otherwise they get stressed and while normally tough enough to cope with occasionally being chased by Rainbow sharks and Plecs this might have made it unbareable for them in the long term. Normally Plecs, Sharks and Loaches are good tank mates as they are all reasonably tough and can put up with a bit of squabbling which there will be with these fish. If you have little or no cover in the tank I think this is the most likely explaination. Loaches, even with no other tank mates, will not do well in bare tanks.
Secondly is it possible your Loaches starved? IME Loaches like to eat heartily and after a while should have fairly fat bellies. Even the smaller loaches like the Pakistan will probably want some catfish pellets or similar each day as they can be very active and so use up a lot of energy. If you only feed flake then it is possible that they are not getting enough food. Most loaches eat mainly from the bottom and maybe not enough is reaching there, plus the Plecs and Shark will take their share of what does. Both of the later will eat algae but your loaches won't so they will suffer more if little is getting through. Please be careful though as overfeeding is a more usual problem in most tanks
My last suggestion is the possibility of them having been starved of oxygen. This is only likely to occur in tanks with little water movement, fairly crowded tanks often with plants and happen over night. Your various tetras and neons are likely to 'sleep' higher up in the tank (where there is more oxygen) and so might the Shark. Your Plecs will gulp air so they are fine in low oxygen enviroments.
So if you have a bare tank, only feed flake or have little water movement these are possibilities. It is strange that the loaches have died. Normally once established these are fairly hardy.
Good luck in finding out.