Could be a great incentive, but not to me personally. I'm very invested in the JVM, and I'd rather have that investment used. Something like the following would make me jump ship instantly:
"Java developers - want to use Flink/Spark, some Scala/Clojure? How about 'very fast decision trees' learned online out of a Kafka bus?"
At least in the above scenario, it was Andres doing the work of initially getting someone up to speed and then pairing the coworkers on an appropriate level feature/bug. He'd stop by and check in to see where they were stuck and would genuinely try and solve the problem.
So, it has to be someone who is a great coder for that stack and enjoys teaching.
If it's done right, other members of the team become good teachers as well, so the initial burden of teaching is lightened.
Pay them well, and give them a regular chunk of (paid) time to work on something that furthers their growth / is intellectually stimulating / whatever.
Offer to teach the developer something.
"Java developers - want to learn Node and React?"
"Rails developers - want to learn Elixir?"
Get one senior person on staff who really knows the stack well and require that they pair program every day with a different member of the team.
Good developers are grateful for the opportunity to level up their skills, contribute, and still make a living.
Andres Camacho in SF has been VP of Engineering and CTO at several startups and is king of this strategy.