Having a "taste" of different languages is indeed an excellent idea.
I'd personally stay away from Java. It's just too verbose and HTML5 can do many, perhaps even most things Java excels at. The library is quite verbose and system integration is, in my opinion, still lacking.
However, no matter what you do, you will never be able to build an engine (in the sense of multi-game shared platform) without writing a few games first, possibly from different genres. Your resulting design would just not interact well with the gameplay constructs or the data flow involved.
So, next step in your path to engine design is: write an engine (in terms of logic for a game).