Would it be possible to have a single server running the JVM to evaluate user code in serval different languages?
Yes it would be feasible.
Would this be at all efficient?
I'm not sure why efficiency is a particular concern. It strikes me that running small examples for remote users does not require efficiency. Either way, my take is that it should be efficient enough.
However, the real concern here is that this kind of service invites various kinds of abuse:
People may be inclined to try and break your sandbox. And if you haven't implemented it properly (or if they can exploit some unpatched security flaw) they may succeed, and get into the rest of your system.
People may be inclined to launch denial of service attacks. There are various things that a security sandbox can't deal with; e.g. creating large data structures to trigger GC overload and OOMEs, creating lots of threads, infinite loops.
Or they may do some of the above accidentally.
If you implement a service like the one you are proposing, you will need a strategy to deal with these things.
FOLLOWUP
Regarding the comment on efficiency, my thought was that loading an entire interpreter into memory for possibly a single line of code, may not be the best approach to take?
Well the normal way that you implement a service on a JVM-based language is to run multiple requests in the same JVM instance. If you did that here you wouldn't be loading the interpreter each time. You'd just be reinitializing it.
But either way, you are better off leaving the efficiency problem to later.