I would also choose a in this sentence. If you wrote the, it might mean that you are thinking of various periods of discovery and learning, or contrasting the time spent at university with the time spent at school. This is possible, but I would then prefer "the most worthwhile time for discovery and learning".
To put on a pedantic hat, university is not a time or period. Strictly speaking, one should write Going to university or Being at university.
If you choose 'a' it means that being at university is a good way to discover and learn. If you use 'the' it implies that being at university is the only worthwhile way of discovering and learning, which isn't always the case. I would use 'a' in this sentence.
The bottom line is that both answers are correct, and the textbook or teacher claiming that only one is correct is wrong. Most can be a superlative, and if it's meant that way (if the writer thinks that this is the very best time of one's life for discovery and learning), then the is the answer. But most, as Loob points out, can also mean "extremely", and if that's the meaning intended (it's a very good time, not necessarily the best), then a is the answer. I suspect that the latter was probably intended, but that suspicion doesn't make "the" wrong. The sentence is ambiguous.
I agree with E2efour and Loob that "university" is not a time but a place. In AmE, we'd likely say "The college years are . . . " (we use "college" as a more general word, whether or not the college attended is part of a university).