Warning: largely speculation
The wording is unclear. It is never shown exactly what is on the parchment that is spat out of the Goblet. Dumbledore states that after submitting their parchment...
Tomorrow night, Halloween, the goblet will return the names of the three it has judged most worthy to represent their schools.
We can read that two ways - it returns only the names, OR it returns the exact parchment that was deposited in the Goblet in the first place, school and all. If the school Champions were announced in school order I'd just say the former for simplicity, but Dumbledore doesn't announce the school until he's actually read the parchment so...either he knows all of the possible candidates and their schools from memory (which, given that it's Dumbledore, seems fair enough), or the school name is written.
Given this quote
Next moment, a tongue of flame shot into the air, a charred piece of
parchment fluttered out of it the whole room gasped.
I'm going to suggest three possible answers to your question.
- The Goblet just returns the name of the candidate on a piece of parchment. This is not the same piece that was submitted. This requires the basic assumption that Dumbledore can remember a few dozen students names and school affiliations.
- The Goblet returns the original piece of parchment, but the name of the school is charred off. Depending on how you read the above quotation, this may be a stretch.
- The Goblet returns the original parchment, but Moody called the new school "". That's right, he named the new school blank, what you'd call in computing an empty string. This way he has a fourth school, and Harry's would seem to come out with just his name on it.