As close as you’re going to get, I think, to what the “Church’s teaching” is regarding the question you asked, would be the pertinent sections in the Catechism, paragraphs 309-314:
[b:11xhpy7t]309 If God the Father almighty, the Creator of the ordered and good world, cares for all his creatures, why does evil exist? To this question, as pressing as it is unavoidable and as painful as it is mysterious, no quick answer will suffice. Only Christian faith as a whole constitutes the answer to this question: the goodness of creation, the drama of sin and the patient love of God who comes to meet man by his covenants, the redemptive Incarnation of his Son, his gift of the Spirit, his gathering of the Church, the power of the sacraments and his call to a blessed life to which free creatures are invited to consent in advance, but from which, by a terrible mystery, they can also turn away in advance. There is not a single aspect of the Christian message that is not in part an answer to the question of evil.
310 But why did God not create a world so perfect that no evil could exist in it? With infinite power God could always create something better.174 But with infinite wisdom and goodness God freely willed to create a world “in a state of journeying” towards its ultimate perfection. In God’s plan this process of becoming involves the appearance of certain beings and the disappearance of others, the existence of the more perfect alongside the less perfect, both constructive and destructive forces of nature. With physical good there exists also physical evil as long as creation has not reached perfection.175
311 Angels and men, as intelligent and free creatures, have to journey toward their ultimate destinies by their free choice and preferential love. They can therefore go astray. Indeed, they have sinned. Thus has moral evil, incommensurably more harmful than physical evil, entered the world. God is in no way, directly or indirectly, the cause of moral evil.176 He permits it, however, because he respects the freedom of his creatures and, mysteriously, knows how to derive good from it:
For almighty God. . ., because he is supremely good, would never allow any evil whatsoever to exist in his works if he were not so all-powerful and good as to cause good to emerge from evil itself.177
312 In time we can discover that God in his almighty providence can bring a good from the consequences of an evil, even a moral evil, caused by his creatures: “It was not you”, said Joseph to his brothers, “who sent me here, but God. . . You meant evil against me; but God meant it for good, to bring it about that many people should be kept alive.”178 From the greatest moral evil ever committed – the rejection and murder of God’s only Son, caused by the sins of all men – God, by his grace that “abounded all the more”,179 brought the greatest of goods: the glorification of Christ and our redemption. But for all that, evil never becomes a good.
313 “We know that in everything God works for good for those who love him.”180 The constant witness of the saints confirms this truth:
St. Catherine of Siena said to “those who are scandalized and rebel against what happens to them”: “Everything comes from love, all is ordained for the salvation of man, God does nothing without this goal in mind.”181
St. Thomas More, shortly before his martyrdom, consoled his daughter: “Nothing can come but that that God wills. And I make me very sure that whatsoever that be, seem it never so bad in sight, it shall indeed be the best.”182
Dame Julian of Norwich: “Here I was taught by the grace of God that I should steadfastly keep me in the faith. . . and that at the same time I should take my stand on and earnestly believe in what our Lord shewed in this time – that ‘all manner [of] thing shall be well.'”183
314 We firmly believe that God is master of the world and of its history. But the ways of his providence are often unknown to us. Only at the end, when our partial knowledge ceases, when we see God “face to face”,184 will we fully know the ways by which – even through the dramas of evil and sin – God has guided his creation to that definitive sabbath rest185 for which he created heaven and earth. [/b:11xhpy7t]
As far as Catholic theologians and the theodicy question (theodicy being the branch of theology concerned with the ‘problem of evil’ question) goes, a good example might be Christoph Cardinal Sch??nborn of Austria who gave a Catechesis speach on February 12th of this year entitled “[i:11xhpy7t]You govern all things…”: Suffering in a World Guided by God[/i:11xhpy7t]”. You can access it HERE[/url:11xhpy7t].
Another good Catholic treatment of the subject can be found in a book by Peter Kreeft, professor of philosphy at Boston College. The book is “Making Sense of of Suffering”, and you can read a selection from it on Kreeft’s website HERE[/url:11xhpy7t], along with a link to amazon to buy the whole thing. Also on his site, you can read the selection on “The Problem of Evil” from another of his books, [i:11xhpy7t]Fundementals of the Faith[/i:11xhpy7t]. That article is HERE[/url:11xhpy7t].