At least for mechanical, it's 4 years' working experience, documentation of sufficiently advanced projects, and sign-off from 3 other registered professional engineers who are familiar with your work.
A guy I worked with took the mechanical design variant. I don't know how the HVAC variant is. The test is over the most advanced stuff you learn in your degree; the "specialist" portion of the test (what your concentration is in, e.g., HVAC, thermal/fluids, or machine design and materials) is ~25 questions and you have 4 hours to complete it, in addition to the other 4 hour comprehensive portion that's the same for all takers.
On top of that, to keep your license, you need to complete some amount of classroom education every year.
As far as coursework goes, the coursework for some of my upper-level mech E classes was usually identical to a graduate-level course, the only difference being graduate students do a research paper+experiment for a final exam and undergrads do a traditional written exam since they had access to funding and we did not.
imo this comment is dismissive and glosses way too heavily over the rigor that goes into even the "lowliest" of engineering programs.