I was having a discussion about Augustine of Hippo and someone argued that if someone preached that the Eucharist is merely a symbolic act and not literally Jesus' flesh and blood (just like what St. Augustine said), he would certainly be sentenced to death by burning.
Is there any truth to this?
It would depend. The middle ages is a pretty big time and space. The answer would vary based on when you said it, who you were, and who heard you. On the whole, you'd probably be more likely to end up in trouble for preaching without episcopal license than you would for anything else, as the doctrines of Real Presence and Transubstantiation were not really sussed out until the late twelfth century. Nor was there any real authority before the Gregorian Reforms of the eleventh and early twelfth century that could issue a universally binding ruling on the subject.
On top of all that, it took quite a bit of effort to be executed for heresy. You would have multiple opportunities to recant. There was certainly no medieval juridical authority which would execute you for a single possibly-heretical speech.
Prior to the 11th Century, there were no Eucharistic controversies over the "real presence." In fact, the first known text dedicated to Eucharistic physics was written in the 830s.
A turning point was the Berengarian Controversy of the 1070s. A scholar named Berengar of Tours was attacked by a rising ecclesiastical star named Lanfranc of Bec. Lanfranc attacked Berengar for heresy, and for the first time in history a scholar was forced to retract a purely Eucharistic heresy. Lanfranc made a name for himself, and went on to become Archbishop of Canterbury for William the Conqueror.
By the time of the Fourth Lateran Council (1215), it was well established that the Body of Christ existed in the Eucharist, but there was still controversy regarding what that meant.
Did the bread still exist? Was the essence of Christ joined with the essence of bread, as the the essences of Father, Son, and Holy Spirit were joined in the Trinity? If not, where did the bread go?
These questions sound funny, but they bordered on legitimate "scientific" interests. Albertus Magnus was a Eucharistic scholar who also discovered the first element since Aristotle.
The "modern" Catholic view on the Eurcharist congealed in the 13th Century. By the time Thomas Aquinas got involved, he was merely giving voice to the dominant ideas.
I don't know enough about punishment in the Middle Ages to know how "deniers" were dealt with. Most popular heretics didn't obsess over the Eucharist.
It's worth pointing out that most of this doctrinal development coincides with the Great Schism (1054-1204). To this day, the Eastern Orthodox are mystified by this Eucharistic controversy, and wonder what the big deal is.
TLDR: For the first part of the Middle Ages, nobody cared. Then it became really fucking serious.
Sources: Theologies of the Eucharist in the Early Scholastic Period by Gary Macy.
Heresy started to be a big issue only in the second part of the Middle Ages. Only in the 11th century the institutions start to worry about it and the first Inquisition tribunal is created in the 12th century.
High Middle Ages were more quiet, possibly because fewer people had the education and the interest to debate theological issues. To give a prominent example, in the IX cent. a Saxon monk named Gottschalk of Orbais expressed some very controversial views of predestination, which managed to stir confusion among clergymen. His superiors forbade him to preach. After he refused, giving a speech to a Council in Mainz, he was again forbidden to preach, beaten and sent back to uis monatery to be disciplined by the Abbot. When this didn't work out, he still had the chance to speak at another Council, which condemned him. To counter this, he had the chance to appeal directly to the Pope in Rome (which he didn't). He ended his days in another monastery and, refusing to give up his positions, he was denied the last sacraments. Not quite as hardcore as we picture heretics in the Dark Ages :)