On the contrary, Gregory says (Moral. xx, 1): "Holy Writ by the manner of its speech transcends every science, because in one and the same sentence, while it describes a fact, it reveals a mystery."So here Aquinas gives the literal sense as the baseline of our understanding: how words signify things, but then shows why we have cause to think there may be more levels of meaning than that.
I answer that, The author of Holy Writ is God, in whose power it is to signify His meaning, not by words only (as man also can do), but also by things themselves. So, whereas in every other science things are signified by words, this science has the property, that the things signified by the words have themselves also a signification. Therefore that first signification whereby words signify things belongs to the first sense, the historical or literal. That signification whereby things signified by words have themselves also a signification is called the spiritual sense, which is based on the literal, and presupposes it. Now this spiritual sense has a threefold division. For as the Apostle says (Hebrews 10:1) the Old Law is a figure of the New Law, and Dionysius says (Coel. Hier. i) "the New Law itself is a figure of future glory." Again, in the New Law, whatever our Head has done is a type of what we ought to do. Therefore, so far as the things of the Old Law signify the things of the New Law, there is the allegorical sense; so far as the things done in Christ, or so far as the things which signify Christ, are types of what we ought to do, there is the moral sense. But so far as they signify what relates to eternal glory, there is the anagogical sense. Since the literal sense is that which the author intends, and since the author of Holy Writ is God, Who by one act comprehends all things by His intellect, it is not unfitting, as Augustine says (Confess. xii), if, even according to the literal sense, one word in Holy Writ should have several senses. (Summa Theologica, Part 1 Question 1, Article 10)
As a second meaning, he recognizes that a human author is limited to recording things, while God also has the privilege of arranging the things that are recorded. So when God is the author, not only do the words signify things, but also the events recorded may have a further meaning. For instance, the symbolism of "Christ, our Passover" is not simply someone's fanciful thought, but a recognition that God's hand was behind there being an ancient festival where the people used Lamb's Blood as a sign of death passing over, and that same hand was behind Christ being called Lamb of God, behind his Last Supper being connected with the Passover meal, and behind his death being associated with the Passover.
A third meaning, the moral sense, he bases on the idea that we are to be imitators of Christ: "Whatever our Head has done is a type of what we ought to do." For example, from Christ's feeding the multitudes we can draw the conclusion that, as he fed the hungry, we also should feed the hungry.
The fourth sense has been termed "anagogical" but these days we might say eschatological, as he says, "so far as they signify what relates to eternal glory, there is the anagogical sense." Here we see Christ's resurrection as a promise of our own resurrection, and the wedding in Cana as a foretaste of the wedding feast of the lamb.If God has his hand in writing not only the words but also the events, then the events themselves can foreshadow what is to come.
So according to Aquinas, other meanings of Scripture are derived from God's hand in arranging history, from our call to follow Christ, and from God's promise of the fulfillment yet to come.