I'm not sure why you're so focused on GPU performance here.
Compiling happens on the CPU - much like most (if not all) rendering. I'm not sure what use of GPU there is outside of testing. You'd have to look into UE4 documentation.
If 3D modelling will be done in 3rd party tools, they may utilize a GPU or not (higher chance of supporting Nvidia).
Depending on the size of the project, I'd focus on CPU and RAM. And since this is for learning and could be a one-off, I'd use cloud or a swarm setup from whatever was available (as pro game developers would
).
In fact, if you go into UE4 hardware requirements, GPU isn't even mentioned - other than having to support DX11/12.
On the bottom of this page they show an example of a workstation used by Epic developers - with GTX970.
Nvidia probably offers more support and it will be easier to find help in the dev community, so that's clearly the safe choice. But since developing on UE4 isn't very GPU-dependent, the buyer should be fine with an AMD card as well.
The only exception being...
This is incorrect. UE4 supports RTRT and it requires an Nvidia card, precisely:
"NVIDIA RTX and some GTX series cards with DXR support using the latest device drivers."
A collection of topics to aid with development of projects using hardware ray tracing features in Unreal Engine.
docs.unrealengine.com
In other words: RTRT is built on CUDA and it may use RTX or be emulated on a non-RTX card.