Great topic. Let me pose it a different way.
Our practical goal is to extend the drive with more first downs until eventually score. So one way to look at it would be, what are the odds of extending the drive with different down and distance. Using some dated data that looked at this specifically, but going with it for sake of argument.
From 2002 to 2006, 66% of the time, the downs starting with a 1st and 10 ultimately resulted in another first down or a TD. So we could ask, how many yards to go on 2nd down gives us greater than that 66% chance of gaining a 1st down or TD? The answer from the same data set was 5.5 yards. So all other things being equal, 2nd and 5 is more likely to see your drive extended another set of downs than a 1st and 10 is. But 2nd and 6 is less likely. (For 3rd down, 1.5 yards was the 66% success rate break even point.)
Though we have to look at what we end up with. Let's say we only get 1 yard on 2nd down. Now we're 1st and 10 at the same yardline as our other choice and we still face those same odds of extending the drive. But it's also true we might pick up more than 1 yard in which case our 1st and 10 occurs further up the field and is preferable if achieved.
One can argue 2nd and 1 (or inches)is the best possible situation (other than 1st and short) for a number of reasons. The difference between 1st and 10 and 2nd and 10 is a lot worse than the difference between 2nd and 1 and 3rd and 1. Which means 2nd and 1 is a great chance to take a shot downfield, where the QB can be told to play it safe and throw it away if it isn't there. The defense is in a tough spot having to defend against the short gain, which may increase the chances of a favorable matchup. And if they don't stack the line enough the play can be changed to an even higher chance of picking up the 1st with a run.
That is all subjective though. My gut on that is I'd rather have the 2nd down. Others have mentioned, the best way to look at it is probably expected points. Looks at the situation like
this one suggest that gaining 9 yards on first down ultimately results in more expected points on average than gaining 10 yards on first down.
Incidentally this is a different look by the same author that I got the 1st and 10 equates to 2nd and 5.5 based on success rate from. It's interesting to see the expected points for a 10 yard gain on first down on that graph are about equal to a gain on 1st down that leaves you with 2nd and 5 which further supports that part.