"I'm suddenly terribly unsure which one is correct, so maybe you lot can help.".
It all depends on the noun you use.
First, let's look at your first example:
"I study [subject] at the University of [City]".
"I study physics at the University of Miami."
In this sentence, "physics" is an uncountable noun (or noncount noun). That means it cannot be counted.
We cannot say, "1 physics, 2 physics, 3 physics."
Uncountable nouns do not require an indefinite article.
- Please buy sugar. (Incorrect: Please buy a sugar.)
- Love is blind. (Incorrect: A love is blind.)
- I like coffee. (Incorrect: I like a coffee.)
See more examples of uncountable nouns here: Uncountable Nouns
Now, your second example:
"I'm a physics student at the University of Miami."
In this case, "physics" is not a noun. It is actually an adjective that tells us what kind of student.
So, we look to the noun "student". "Student" is a countable noun (or count noun). That means it can be counted. We can say, "1 student, 2 students, 3 students."
Countable nouns do require an article (such as an indefinite article "a" or "an" or the definite article "the"), a quantitity word (some, three, many), or a possessive adjective (my, our, their).
- I saw a mouse. (indefinite article)
- Did you see the show? (definite article)
- He needs three books. (quantity word)
- That is my house. (possessive adjective)
- That is my red house. (This one has an adjective before the noun, like your example)
Read more about countable nouns here: Countable Nouns