just make sure it has no properties that are toxic to invertebrates and you should be fine as far as cohabitation goes. Other than that...keeping a plant alive in a terrarium would be similar to how you would in a pot, except i think you may have to be more careful when using plant food. I'm not a green thumb by any stretch though so I could be wrong about that...but as far as what type of plant? Cacti are a bad idea for sure and any other plant with sharp/pointed edges...
After making sure your plant won't be toxic to your invert there are a few things.
You would need a plant that could tolerate the conditions for whatever invertebrate you have. Does the plant need the same soil conditions as the invert (Wet or dry?) The same atmospheric conditions?
Can the plant handle low light, or will the invert be able to escape from bright light somewhere?
Is maintenance going to be a problem? Plants can hide prey items or pieces of prey items. They can also die, or leaves could. Any material like that can lead to mold or other nasty things. How can you deal with any insect pests on the plant?
Are you going to be able to deal with the invert during this maintenance?
How are you going to fertilize the plant? (Organic Compost would be the best choice IMO)
Also, make sure that the plant will not overgrow the terrarium. Just because it is only 10" tall when you buy it doesn't mean it will stay that way.
The most important thing is to find a plant that can be grown in the optimal conditions for the invert. Anything else is just asking for trouble.
Just think about these points when choosing some plants, it will save you a headache later.
If you want suggestions for an average aquarium, a Pothos vine would be a good choice for anything that needs moderate to high humitidy in a low light setting. You should do research on any plant species before you decide on it though.