You cannot upgrade the graphics card in the iMac. You'd have to replace the whole system.
The only scenario where you really need to consider an NVIDIA GPU for performance is if you are specifically using the ray-tracing renderer. If you are using the standard Classic 3D renderer, then the GPU will not make a difference in performance.
That said, the difference between your i5 CPU and a current i7 CPU could be significant.
I see that you specifically called out ray-tracing as a GPU requirement. However, since CC, Adobe has included Cinema 4D with After Effects [link] (well, a Lite version). The After Effects team at Adobe considers the ray-traced renderer to be a dead piece of technology and they are no longer developing it.
So, if you have CC or CC 2014, I would suggest you focus more on the integration of C4D.
That being said, the GPU does still matter for Premiere (and several third-party AE plugins, such as Element 3D), so you should check what requirements they have when you're shopping around. They're a lot less limited than AE was though.
- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')
No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.