Would I say
Montags und donnerstags gehe ich zur Uni um halb elf.
or should I be writing
Montags und donnerstags um halb elf gehe ich zur Uni.
I feel like the first one sounds better, but I’m still not sure if I’ve done something wrong.
All German sentences follow the TeKaMoLo rule for correct sentence structuring.
As Emanuel said, the trick is: The more important an aspect is, the later (i.e., the more towards the end of the sentence) it’s mentioned. This is correct for all unmarked sentences.
On a grammatically point of view, your sentences are fine as well, but you have to be aware that your sentence has a marked word order. This means your putting focus on a certain sentence element, in your case your emphasing that you’re going to university on Monday and Thursday at half past ten. Also, the constituent structure is changing.
These 2 versions work:
Subtext: on other days you go to school at a different time. Halb elf is something in between temporal and modal info here. You can replace it with by car.
Subtext: at 3 I go to the mall / on other days at half 10 I go somewhere else. The whole chunk in the beginning is one time information that cannot be split.
Either way, time has to come before place here, not because of TeKaMoLO, but because gehen is a "locational" verb here so the information where you go is much more important than when. The more important, the later in the phrase. That's the trick.
You can have at most one element before the conjugated verb. Usually it's the subject, as in:
It can also be an adverbial component (TeKaMoLo) as in:
Prepositional phrases also work:
There are many other elements that can be fit in there but never two at a time.
German word order is complicated and a summary of important points can be found here: utexas