Although you are directing your question specifically towards Roman Catholics, I would point out that Eastern Orthodox also believe in transubstantiation as you define it, although different terms are sometimes used. So I will also comment on your question from an Eastern Orthodox perspective (to the best of my ability, God being my helper).
In answer to your title question, "According to proponents of transubstantiation, in what sense is Jesus present 'where two or three are gathered'?", I would say that this verse (Matthew 18:20) is not related to transubstantiation, so that the answer to the actual question, "In what sense is Jesus present 'where two or three are gathered'?", does not depend on any doctrine concerning transubstantiation.
It is important to realize that Matthew 18:20 is part of a broader set of instructions that the Lord gives specifically to the Apostles. These begin with His instruction that if a brother who has sinned against one will not accept admonishment from the one he sinned against, with witnesses if necessary, then he is to be taken to the Church (Matthew 18:15-17), where whatever the Apostles declare regarding the matter shall also be bound in heaven (Matthew 18:18). Verses 19 and 20 are a continuation of verse 18:
Again I say to you, if two of you agree on earth about anything they ask, it will be done for them by my Father in heaven.For where two or
three are gathered in my name, there am I in the midst of them.
Many contemporary Christians in the Protestant tradition argue that there is no need for any formal "Church", because of what the Lord says Matthew 18:20. I have heard it said, for example, "I had coffee with another Christian. We just had Church." This ignores, however, the context that the Lord set, as witnessed in the previous five verses.
The misinterpretation of this passage is not new. In the 3rd century, Cyprian of Carthage wrote:
Nor let any deceive themselves by a futile interpretation, in respect
of the Lord having said, “Wheresoever two or three are gathered
together in my name, there am I in the midst of them.” Corrupters and
false interpreters of the Gospel quote the last words, and lay aside
the former ones, remembering part, and craftily suppressing part: as
they themselves are separated from the Church, so they cut off the
substance of one section. For the Lord, when He would urge unanimity
and peace upon His disciples, said, “I say unto you, That if two of
you shall agree on earth touching anything that ye shall ask, it shall
be given you by my Father which is in heaven. For wheresoever two or
three are gathered together in my name, I am with them;” showing that
most is given, not to the multitude, but to the unanimity of those
that pray. “If,” He says, “two of you shall agree on earth:” He placed
agreement first; He has made the concord of peace a prerequisite; He
taught that we should agree firmly and faithfully. But how can he
agree with any one who does not agree with the body of the Church
itself, and with the universal brotherhood? How can two or three be
assembled together in Christ’s name, who, it is evident, are separated
from Christ and from His Gospel? For we have not withdrawn from them,
but they from us; and since heresies and schisms have risen
subsequently, from their establishment for themselves of diverse
places of worship, they have forsaken the Head and Source of the
truth. But the Lord speaks concerning His Church, and to those also
who are in the Church He speaks, that if they are in agreement, if
according to what He commanded and admonished, although only two or
three gathered together with unanimity should pray—though they be only
two or three—they may obtain from the majesty of God what they ask.
“Wheresoever two or three are gathered together in my name, I,” says
He, “am with them;” that is, with the simple and peaceable—with those
who fear God and keep God’s commandments. With these, although only
two or three, He said that He was, in the same manner as He was with
the three youths in the fiery furnace; and because they abode towards
God in simplicity, and in unanimity among themselves, He animated
them, in the midst of the surrounding flames, with the breath of dew:
in the way in which, with the two apostles shut up in prison, because
they were simple-minded and of one mind, He Himself was present; He
Himself, having loosed the bolts of the dungeon, placed them again in
the market-place, that they might declare to the multitude the word
which they faithfully preached. When, therefore, in His commandments
He lays it down, and says, “Where two or three are gathered together
in my name, I am with them,” He does not divide men from the Church,
seeing that He Himself ordained and made the Church; but rebuking the
faithless for their discord, and commending peace by His word to the
faithful, He shows that He is rather with two or three who pray with
one mind, than with a great many who differ, and that more can be
obtained by the concordant prayer of a few, than by the discordant
supplication of many.
In answer to the summary question, "in what way is Christ present where two or three are gathered – physically or through his Spirit?", I think that would depend on whether the Eucharist was being celebrated or not as well as, most importantly, the will of God. God being God, He could make Himself physically present at will, and has in the past, as Cyprian recounts in the story of the three holy children (although He was not recognized at the time). But in the context of the "transubstantiation", I would say that we only expect the Lord to be physically present in the form of His Body and Blood at the Eucharist. In other words, it is not the two or three gathering together in His name that effects His physical presence, but rather the epiclesis during the Divine Liturgy - the point at which the priest (or hierarch) prays the same words used by the Orthodox Church since at least the fourth century: "Make this bread the precious Body of Thy Christ; and that which is in this cup, the precious Blood of Thy Christ; changing them by Thy Holy Spirit" (Divine Liturgy of St. John Chrysostom).