I'll address the passages mentioned in your post one by one.
Firstly, Matthew 28:19 clearly establishes trinitarian baptism, and the early Christian writings confirm that this was the universal practice. A few quotations will suffice:
...baptize in the name of the Father, the Son, and the Holy Spirit... (The Didache, Chapter VII)
They there receive the washing with water in the name of God (the Father and Lord of the universe), of our Savior Jesus Christ, and of the Holy Spirit. (Justin Martyr, ANF 1.183)
Now, on to the other passages. In Acts 19, we see a group of about twelve men, who had received the baptism of John. It seems they had not heard of Jesus Christ; in any case, they had not heard about Pentecost or the coming of the Holy Spirit. It seems then that they would have been baptized as repentant Jews, but without belief in Jesus. Therefore, they were rebaptized, now believing in Jesus.
I do not take "baptized in the name of the Lord Jesus" to mean that they did not receive trinitarian baptism; rather, I take this as a statement to clarify that they received Christian baptism, not John's baptism. John's baptism would not have included mention of the name Jesus; Christian baptism did. We see the immediate result that "the Holy Spirit came upon them," further implying that they received normal trinitarian baptism.
In Acts 2, Peter is preaching to a group of Jews in Jerusalem. His sermon assumes their knowledge of Jesus and his ministry:
“Men of Israel, hear these words: Jesus of Nazareth, a Man attested by God to you by miracles, wonders, and signs which God did through Him in your midst, as you yourselves also know— (Acts 2:22 NKJV)
It is reasonable to assume that many of his listeners were also familiar with the ministry of John the Baptist; in fact, it is likely that a large proportion of them had been baptized by John. Peter therefore said: "let every one of you be baptized in the name of Jesus Christ for the remission of sins." The baptism of John was not enough; Christian baptism was required.
Again, there is no reason to believe it was not trinitarian, especially give that his call to baptism was immediately followed by the promise: "you shall receive the gift of the Holy Spirit." (Acts 2:38 NKJV)
In summary, so far, it seems that "baptized in the name of the Lord Jesus" simply refers to Christian baptism, particularly as distinguished from the baptism of John.
Acts 8 is an unusual case; it is one of only three times in Acts that receiving of the Holy Spirit was not directly tied to baptism. The first is the apostles and disciples on Pentecost (the first general outpouring of the Holy Spirit); the second is here in Acts 8, which is the first recorded instance of Samaritan Christians; the last is in Acts 10, when the Holy Spirit fell on Cornelius and his companions prior to baptism (the first Gentile conversion).
It is interesting to note that all three cases were "firsts" in the expansion of the church: the founding of the church, its expansion to Samaritans, and its expansion to Gentiles.
In this passage, Acts 8:16a is the part we're particularly interested in:
They had only been baptized in the name of the Lord Jesus.
Unlike other references to "baptized in the name of the Lord Jesus," here it is paired with the word "only." There are two ways to interpret this sentence in context:
- The baptism was only in the name of Jesus
- They had only been baptized, but they had not received the Holy Spirit
I don't see any clear-cut way to dogmatically state which interpretation is correct here. However, given the Matthian commandment for trinitarian baptism and the pattern in Acts of using "baptized in the name of the Lord Jesus" to simply refer to Christian baptism, the second interpretation is not only plausible, but also seems likely to be the correct one.
Perhaps some Greek scholars could opine on the relative merits of these interpretations of the actual Greek text and shed further light here, but that's above my pay grade. (It's all Greek to me :)
Hope that helps.