How do MedCatTrainer annotations refer to spans of text?

How do MedCatTrainer annotations keep track of the text span they refer to? Is the text linearized and then each annotation refers to the start and end index(es) of the span(s) supporting that annotation?

Yes that is correct.

An annotation would appear something like this:

The meta-annotation (“meta_anns”) tasks and values are completely customisable so it will appear according to whatever you have configured it to be.