Is it? First, it depends on how much do you pay for it. It is different in countries like United States, where you can pay tens of thousands of dollars to finish university and it is different in countries like Slovakia where universities are free and living costs for students are low, so they can support themselves with part-time jobs without ever getting into debt.
Even though you can get into debt attending university, it can still be worth it. From all research that I have seen and read (disclaimer – it is not all the research in the world), university still pays up. Even when you get into debt, during the life you will have higher income after deducting the debt. This is of course not true for all universities and all degrees.
Therefore you should always think about this – Will getting into debt pay up in the long run or would you have the same wage without degree?
When universities are free, you do not have to think as much about the money. Only money you loose is basically the money, that you would make in the five years that you spent on the university. Except for this, the only important factor is if the university really gives you something valuable.
This is also true for paid education. You should not waste your time or money if the educations does not enrich you. Enrichment does not have to be higher wage in the future. Enrichment is gained knowledge in general. It includes learning how to do proper science, how to do rigorous research. Universities can give you valuable friendships and contacts for life, that can enrich you more than the university itself.
So to answer the question Is university worth it? – It is. If you choose good university that does not leave you broke and you use all the opportunities to meet new people, explore new ideas and do your own research, university is definitely worth it. It will give you lot more than higher paychecks in the future. It will open your mind to new ideas and new people. And those are highest paying investments.