If two Pokemon have the same moves you need to look at their stats and typing, since some Pokemon might have dual typing that can be beneficial for resisting moves.
So in your example of Arcanine vs Flareon, Arcanine does less damage than Flareon because Fire Fang is slightly worse than Fire Spin, Fire Blast is slightly worse than Overheat, plus Arcanine has lower base attack, but not by much.
However Arcanine does have more HP, which does matter, because you usually need a balance of damage and survivability when raiding, 6 glass cannons will faint long before the timer runs out while 6 tanks won't deal enough damage.
If the TM is guaranteed to give you the right move then I think it's worth using - so changing fast moves, or charge moves where you're guaranteed a better move since both of the options are useful.
If it's not, then you'll need 2 TMs available in case you roll a bad move, so that if you do get the worst move of the 3 using a second TM is a guaranteed improvement.
Legendary raids have good TM drop rates so hopefully get back your TMs anyway, or at least some.