Translation:It is not clear whether the shirt is too big or too small.
"Непонятно, велика рубашка или мала. "
Translation: It is not clear whether the shirt is too big or too small.
Does inversion always take place before «или», when the sentence includes "whether"?
I believe inversion in this case is added for emphasis (Непонятно что? Велика или мала рубашка.) It won't be a mistake to say, 'Непонятно, рубашка велика или мала' but will sound slightly less natural. It is important to bear in mind that the Russian или is more versatile compared to 'whether' in English. There are many examples where you don't inverse the word order and use или as or.
You could add ли in if you wanted to change the meaning.
Непонятно, велика рубашка или мала - It's not clear whether the shirt is too big or too small.
Непонятно, велика ли рубашка - It's not clear whether the shirt is too big.
The adjective великая/великий has a very different meaning (great, magnificent, e.g. Императрица Екатерина Великая)
Then it is "большая или маленькая".
"Рубашка велика (кому-то)" means that it is too big (for someone). "Рубашка мала (кому-то)" means that it is too small (for someone).
What kind of grammar is this actually? Why would you use the shorter forms of the adjectives? What difference would it make to use большая and маленкая?
It's common to say it the way you suggested (Рубашка мне большая) though grammarians would probably cringe. Большой denotes that something is big compared to a similar object of the same kind (this is a big shirt and that is a small shirt). Велика/мала are used to indicate the shirt's size in relation to its wearer. Мне эта рубашка мала. А тебе как раз! (This shirt is too small for me but just the right size for you!)
For example there are two shirts. One of them is big. Another one is small.
The big one is still too small for him. The small one is too big for her.
Большая рубашка ему всё равно мала. Маленькая рубашка ей велика.
If I wanted to say that the shirt in question is too big or small for me, would Непонятно, мне велика рубашка или мала. Be correct?