XLR are better when the signal deficiencies are offset by noise advantages. Balanced have a percent of CUB, Capacitance UnBalance. The two “halves” are not created equal and change the SIGNAL, it has to as they are subtracted to cancel the noise (common to both sides). And yes, that means noise isn’t 100% “gone” either! Noise has to be 100% the same on both wires, and the signal noise has to be 100% equal and opposite on both wires. CUB means it is not the case. I won’t get into the balance of the driver op-amps but they aren’t all equal and opposite either. Very good but this is a system of analog interfaces to get right. Errors keep adding up.
In cases of extreme noise, with the added benefit of low frequency noise rejection of XLR and long distances, CUB distortion can be less an issue than what happens to the signal with balanced designs. As a plus, attenuation on XLR is good (different driver amps) so any loss there is mitigated. No cable is 100% balanced.
An added outer shield makes CUB WORSE. It magnifies the ground plane differences and the impact it’s on CUB. But, if the NOISE is attenuated 100dB by the added shield this offsets the increase in CUB distortion.
That no cable is 100% balanced means that the passive CMRR, Common Mode Rejection Ratio isn’t “perfect”, either. That is determined by the physical geometry of the cable as much as the signal balance.
RCA are 100% accurate on the signal side, there isn’t a “balance” to get right. But, they can’t shield low frequency magnetic noise like XLR. For RF, they are actually better with a proper low transfer impedance shield. A foil braid or double braid is 100 dB shield isolation to RF per SEED Shield Isolation Device tests.
For shorter runs, most of us, RCA is actually better most of the time signal wise. But, if you have audible noise, the small CUB impact of an XLR is worth the trade-off to remove audible noise. A studio can’t chase noise all over so they are 100% XLR as any noise is far worse than what happens to the signal.
For longer runs, 20 feet or so, go XLR as the advantages to the signal amplitude impact Attenuation to CMRR balance noise more and more.
And yes, a lot of equipment use the Pin 2 and Pin 1 as a cheater on an XLR plug for your convenience to use an XLR like a RCA. But it isn’t great to do this as and XLR isn’t as good as an RCA in that situation. But, if you don’t have NOISE (there is no more XLR balance wired Pin 1 and 2) all is good.
DO, DO, DO match your cable to the inputs provided; balanced or unbalanced. Do NOT buy XLR and wire for RCA, you forfeit the advantages of either cable! If you could wire and XLR to ever be as good as an RCA, why would we even have RCA? An RCA minus magnetic noise is better than an XLR on the signal side, no CUB. We just need to realize most of the time we don’t have magnetic noise.
If you do have many an XLR, and use the cheater plugs, for a short distance you may be fine (you have no more CMRR using just Pin 1 and 2) as the RF shield is still working and few have magnetic noise issues.
By the way, all outer shield are RF using copper and foils as they don’t have low permeability to magnetic flux. A magnet will stick to low permeability stuff. And yes, this is why XLR was applied as it uses a different method to remove what is called common mode nose (equal and opposite in each signal wire). That does include RF, too! The shield improves the RF CMRR but not the magnetic noise cancellation.
In short no cabe as 100% perfect balance over a length. But, the CMRR advantages insure no nise, and this offsets the CUB in studios. In home high-end audio, we want the SIGNAL to be “perfect” and RCA in proper lengths do that better outside of mismanaged magnetic fields.
As each cable has specific advantages, do use the native design inputs of your equipment as the two cable designs don’t play nice forced to be the other. This is the best answer to if an RCA or XLR is better. What is your equipment’s native I/O? They can decide that better than we can. Go with their designer’s answer.