From what I've read, an earthworm makes a fine addition to a planted terrarium. Helps to keep the soil aerated and like you said, keep it bioactive! If you haven't read Phillipe deVosjoli's "Art of Keeping Snakes", you should definitely check it out. Even though it mainly deals with keeping snakes in naturalistic vivaria, the material could apply to any species. There is a short section in which he talks about adding various earthworms and other insects to the benefit of the enclosure.
Hope this helps!
-----
::i believe in joy > http://www.winds.org/nekomi/hope.html
::my homepage > http://www.winds.org/nekomi
My Growing Zoo:
1.0 Husband (Byron) ^_^
0.1 black cat (Shade)
0.1 rescued stray grey cat (Ghost)
0.1 Brazilian Rainbow Boa (Zia)
1.0 Leucistic Black Ratsnake (Houdini)
1.0 White-Lipped Python (Midas)
1.2 Panduro cichlids (A. panduro)