Universities that I have attended have always had specific policies for exam times. Generally, these policies required midterm exams to occur during normal class periods, and set specific final exam windows according to the time of the class. This helped to avoid conflicts, because everyone with, say, a lecture at 10 am on Mondays would have their final exam on, say, Day 4 of Finals Week between 2-5pm (some special cases always did result in conflict anyways, but these were dealt with on a case-by-case basis).
Typically, specific night classes would have nighttime exams, as well - the assumption was that at least a portion of students in a night class were taking those night classes to allow them to keep daytime commitments like a full-time job.
An 8:30pm-11pm exam time for a class that meets in the evening seems late to me, but could be justified as necessary to avoid other conflicts. For a class that normally meets in the daytime, yeah, if it were me personally I'd be finding a way to cope during more normal hours: splitting the exam into two parts, perhaps, or changing to a "take-home" format.
However, what matters isn't really my opinion nor yours, but the policies of your institution. What do those policies say about exam times?
As a PhD student, I would try not to worry about this sort of thing too much. Classes are a tiny part of the PhD experience, and I assume you'll be done or mostly done with them after a year or two. Your PhD classroom grades won't really matter too much for you unless they are below the "passing" standard - you'll be assessed for future positions based on your research output instead. Personally, I am very much a night person, but there have been a handful of times when I nonetheless had to crawl out of bed with some numbers on the clock that are horrible for me, like 6 am (even 8 am is pretty tough for me). Scheduling is difficult, and occasionally everyone will get pushed out of their preferred timing for one reason or another.