The 7040 was introduced in 2015.  If it's 5+ years old, try replacing the size 2032 CMOS battery.  Bad batteries cause issues that can be difficult to troubleshoot. It took a little while to search and find anything to tell me if the X710 is compatible with the 7040.  I won't say for sure that it isn't, but it certainly looks like it may not be.  According to Dell, it's compatible with PowerEdge systems.  [URL]  I don't know the exact version of the X710 you have, but they all told me Dell PowerEdge.  The only other variable I found was what PowerEdge systems they're compatible with. Of course, this doesn't go without acknowledgement that you mentioned it works in the 9010, 9020, and 3050.  That part I don't have answer for.  With so many Ethernet cards a PC can be compatible with, it wasn't like I could find a list for the 7040.
Here's a strange problem I just encountered. If I plug in an Intel X710 into the PCIe slot, all the fans will continue to run when the system is shut down. I tried another X710 with the same result. The X710 runs fine. Other network cards don't have this issue in the same slot. Only the X710 has this issue. Any ideas what could cause this phenomenon.
Optiplex 7040 fans run when shutdown if Intel X710 board install