Development tools have traditionally been a poor investment long term, but that's not been the case since about 2010, especially since Atlassian went public.
Unity is also gonna be a proxy for Unreal. Since these two competitors are not directly competing on the stock market, Unity should be a bit of a mirror for what the market thinks Unreal would be worth on its own.