What is the function of τινὶ in this phrase? Does it mean “something” as in “They undertook war that was something not very much less impressive than the one against the Peloponnesians”? Why not instead just omit τινὶ and do something like …οὐ πολυν ὑποδεέστερον πόλεμον? Or would that not be grammatically correct?
τινί doesn’t do much, grammatically speaking, and its omission wouldn’t significantly affect the syntax. πολλῷ, lit. “by much,” is dative of “measure of difference,” used with comparatives: οὐ πολλῷ ὑποδεέστερον “not lesser by much” i.e. “not much lesser,” “not greatly inferior”; οὐ πολλῷ τινὶ lit. “not by a certain much,” i.e. “not very much,” “only a little bit.” By making the description at once lengthier and imprecise, the τινι strengthens the sense that they really didn’t know what they were in for at all. No surprise that the Sicilian expedition turns out to be disastrous.
πολύν would be adjectival with πόλεμον (“a great war”), giving quite the wrong sense. πολλῷ (and accordingly πολλῷ τινι) is adverbial, modifying ὑποδεέστερον, which is what’s needed.