While, for the sake of convenience and a lingua franca the Latin “substantia” was used, it was without adherence to “Aristotle's four causes”.

It was used as short hand for “that which the thing is regardless of what I looks like” or “underlying reality”.

The fact that the Church accepts the alternate terminology in the various churches in the East as equivalent evidences that.

Before the consecration the elements appear to be bread and wine. After the consecration the elements appear to be bread and wine, but are no longer.

That is why Trent calls it a miracle.