For reasonable ACs, Melf's Acid Arrow deals more damage on average than Scorching Ray; of a less frequently resisted energy type. It is a better spell. Of course, Magic Missile is better than either.
Acid Arrow, 2nd level slot, deals 10+5 delayed damage on a hit and 5 damage on a miss. On a crit it deals +10 damage.
Scorching Ray, 2nd level slot, deals 21 damage on a hit. On a crit it deals +21 damage.
If you have a P chance of hitting, and you don't care about the delay of damage (!), AA deals 15P + 10/20 + (1-P)*5 = 5.5 + 10P damage.
Scorching Ray deals 21P + 21/20 = 1.05 + 21P damage.
Solving for when they cross, 1.05 + 21 P = 5.5 + 10P -> 11 P = 4.45, P = 0.405. In order for AA to deal the same damage as SR, the AC must be high enough that you need a 13+ to hit. At level 3 with 16 attack stat and +2 proficiency that means the cross over point is 18 AC; on foes with more than 18 AC, AA does 0.55 damage more than SR for every point of additional AC, and 0.55 less damage for every point lower than 18 AC.
At higher levels, AA gains 5 damage on a hit and 1.25 damage on a miss per slot level, while SR gains 7 damage on a hit. Using P chance to hit, 5P+(1.25)1-P + 2.5/20 is 3.75 P + 1.375 damage per slot level. SR is 7P + 0.35 meanwhile per slot level.
At "level infinity" this crosses at 3.75 + 1.375 = 7P + 0.35 -> 5.625 P = 1.025, or P = 0.182, a 17+ to hit. So at higher slot levels, AA requires harder and harder to hit targets to match SR.
AA has the advantage that "per roll" damage applies on a miss. So arcane firearm, for example, adds 1d8/2 to the miss damage. I don't think this is large.
It is unclear who has the variance advantage; AA is one attack roll, but damage on a miss, while SR is multiple attack rolls. I'd have to run numbers.
The above ignores the delayed damage. Damage delayed means that the foe could get a last set of actions before it kills them, or burn resources that would have otherwise not been spent if it had been done earlier. It is perfectly reasonable to discount damage delayed by a significant amount, like 30%; that corresponds roughly to the 3-turn damage measurement of 5e encounter balancing (1 + .7 + .7^2 + .7^3 + ... is 3.333, so a dealing X damage per round forever is "worth" as much as dealing X/3.333 damage all at once).
Doing that and AA drops to 13P+5(1-P) damage, or 8P + 5.5, and the crossover point becomes P=0.35, or a 14+ to hit, or 19 AC instead.
At level 5 using a 3rd level slot, 18 casting stat, 3 proficiency, SR deals 28P+1.4, AA (with delayed discount) deals 14.75P+6.25(1-P)+0.625, or 8.5 P + 6.875. These cross at 19.5P=5.475 or P=0.280; for AA to outdamage, 16+ to hit, or a foe with 23 AC.
AA is only better against rather high AC foes after you account for the "damage later on sucks" factor, and it gets worse the higher level slot you use and the more accurate the spellcaster is.
Finally, AA suffers from blowthrough problems; a SR (under many DMs) doesn't require pre targetting every ray. So if the first 3 rays kill a foe, the 4th ray can go after another. AA is more likely to waste damage.
Its only real advantage is it isn't fire damage, and if you know a foe has 5 HP left it is a guaranteed kill.
Compared to MM with a 3rd level slot, 5 darts at 3.5 damage is 17.5 flat damage. Comparing to SR we get 17.5 = 28P+1.4, or 28P=16.1, or P=0.575 is the crossover point. So if you have a 55% chance or less to hit, MM wins; or a 12+ to needed to hit, or an AC of 19 or higher.
Force is less resisted than even Acid, and I'm really not sure there is a range where AA beats SR even without future discounting that MM doesn't beat both.
TL;DR; on higher AC targets, MM wins. Otherwise, SR wins, especially if you account for "delayed damage isn't as good as damage right now".
At higher levels, MM adds 3.5 damage per slot; SR adds 7*P+0.35. Basically, if you need a 12 or higher to hit, MM does more damage than SR does, regardless of slot.
At level 17 with 20 int and an item that adds +2 to hit to your spell attack rolls, a 12+ corresponds to 12+6+5+2=25 or higher AC. At level 3 with 16 int it corresponds to a 17 or higher AC. MM definitely wins the variance battle, so is more reliable as well; maybe not if you do the "MM only rolls for damage once" ruling however.
For every point lower than that threshold, SR does 1 more DPR (+ about 1/3 per additional slot level). So on a foe with merely 20 AC, SR with a 4th level slot does 8.5 additional damage over MM on average (aka 40% more, which is reasonably large). Now, if you go for the "MM rolls once" and you stack a damage boost on it it just blows SR out of the water.
(PS: I didn't have the crit boost the delayed damage on AA; ruling it does is reasonable (as is ruling it doesn't), but the effect is tiny; 0.25 flat damage + 0.125 damage per higher level slot. The effect of this on the above math would be lost in the rounding error.
I also possibly have arithmetic errors above; I tried to show my work to ensure that any errors are more obvious.)