The issue has nothing to do with infinitives.
Rather, it is this rule that the incorrect sentences are not following:
When "than" is used, the two things being compared must be the same part of speech and must have similar usage.
2a) "more people" than "what were expected" (both function as nouns indicating numbers).
The "what" is commonly omitted and there by implication only: "more people than were expected".
2b) "more people" could go with any of:
- what were expected to come (expected by the inviters).
- what they expected to come ("they" being the inviters).
- what they were expecting to come ("they" being the inviters).
Again, "what" and/or "to come" are often omitted in common speech.
But "what they were expected" isn't even a complete clause.
While it could have an implied completion, as in "what they were expected [to do]", and so be a complete noun clause, it wouldn't represent a number.
3a) "The prices are lower than they …" ("they" refers to "the prices")
2a) "More people came here than they …" ("they" doesn't refer to anything)
Notice that in 3a, "prices" and "they" are both nouns, and both represent prices.
However in 2a, "more" and "they" are both nouns, but one represents a number and one represents the actual people.
So they can't form the two parts of a "than" comparison.
The rule, When "than" is used, the two things being compared must be the same part of speech and must have similar usage., is sometimes difficult to recognize because people commonly omit implied words when using it.
For instance strictly applying the rule to "He jumped higher than the table" could mean: "He jumped higher than the table [jumped].", but what is actually meant is "He jumped higher than [how high] the table [is].".
When writing, the key is to determine what two things the "than" is comparing, and then make sure the two parts of the comparison are the same, and then optionally remove words that most people don't bother saying.