Yes and no.
You can make a List of any of the subclasses of a particular class.
You can have a raw list which is equivalent to a List<Object> and that can contain any type. Not usually a good idea, however.
But you cannot make a List<String, Integer>.
You might be able to use bounds with the OR operator e.g. String<T extends String | Integer> (not certain) but I don't think that is what you want.
More to the point: why do you want such a List? It sounds like poor design.