No, I'm afraid that's not an option, JAXB isn't that flexible.
The best I can suggest is that you put a method on the Shape class which instantiates the "correct" type based on the attribute. The client code would invoke that factory method to obtain it.
Best I can come up with, sorry.