How to understand this?...
" (...) presumptuously treating the blessed miracle of Loretto with ridicule,and expressing yourself in your writings irreverently of his holinesthe great agent and Christ's vicar upon earth;"
It suggest that "Loretto" is a place in which miracle happened, and then that it's a person, probably the pope. What it is then?
You have the gist of it. Loretto (or Loreto) is a place in Italy, famous for a shrine to Mary (the mother of Jesus). The miracle of Loretto is that the shrine is allegedly the house originally occupied by the young Mary in the Holy Land and in which the Annunciation occurred, carried by angels to Loreto in Italy.
The shrine is under the authority and protection of the Pope (i.e. Multiple popes.)
The extract seems to be part of an accusation that someone has been writing mocking the miracle of Loretto and whichever current Pope was protector of the shrine.
For more detail on the issue see the Catholic Encyclopedia article "Santa Casa di Loreto"