Spiny eels die overwhelming for one of three reasons:
1. They jump out the tank.
2. They starve to death.
3. They become infected with a bacterial pathogen.
Number 1 you can rule out, I suspect! But this is actually a very common problem because spiny eels don't like being cooped up in aquaria and their instinct is to jump out and into some other "part of the pond" as they see it.
Number 2 is also very common. These fish are nocturnal predators. They will not eat flake or pellets, and only take frozen (wet, not freeze-dried) foods after a period of adaptation. With few exceptions, newly imported specimens need to be given live foods such as earthworms, Tubifex, bloodworms, river shrimp, and so on. Larger species will also eat clean feeder fish, such as guppies, though these are not essential by any means. There is no way, no how, a newly imported small-species spiny eel will compete with catfish or loaches in a community tank when it comes to finding food. Such species need to be kept only in a tank where they have exclusive access to nighttime offerings of live food (initially) and frozen stuff like bloodworms (later on).
Number 3 is also common. It is less of an issue with big species (like fire eels) but with the small species (like peacock eels) there is a big risk. I don't know the details, but the basic gist is this: spiny eel digs into gravel, scratches itself, and eventually bacteria set in. The skin of the spiny eel then goes white or bloody in places, and invariably it dies after a few weeks. If there is a treatment, it depends on catching this early, maintaining spotless water quality, and treating with something to inhibit the bacteria (such as antibiotics, teatree oil, or salt, perhaps). Simply put:
Small spiny eel + gravel = Dead small spiny eel
Small spiny eel + silver sand or peat = Healthy small spiny eel
There are other things that might kill a spiny eel, but to be honest these three things probably account for 99% of the spiny eel deaths in home aquaria.
Cheers,
Neale