The twelve Ephesians tell Paul, "We have not even heard that there is a Holy Spirit." What do they mean? Is this connected to Paul’s decision to baptize them—even though they knew John’s baptism?

Yes, the wording of v.2 probably seems odd. But there's a parallel in John 7:39, where we read "for there was not yet [the] Spirit, because Jesus had not yet been glorified." Clearly John wasn't tell us that the Holy Spirit didn't exist before Jesus ascended to heaven. He was saying that the promised gift of the Holy Spirit was not yet available. This changed, of course, once Jesus was no longer on the earth physically. See also Acts 2:30 and 33—after Jesus took his place on the heavenly throne, the promised gift was poured out.