Is it bad when my iMac is constantly on? Is it bad if I never shutdown my computer?

I am asking solely terms of hardware so let's assume my software is stable and I reboot regularly to clean up software errors. 

If running constantly is harmful, what can happen? (If not, why?)

The computer in question is an iMac (Mid 2011 - 27 inch) with a 3.4 GHz i7 processor.
No, it's fine. The CPU's heatsink may warp over time (unlikely unless there were QA problems to begin with like some in the first generation MBP) and reduce the transfer of heat, leading to thermal thresholds being reached and the system shutting down.

Some may claim excessive fan wear, leading to failure, but I ran the stock fans in my 2006 MBP at 6,000 rpm for over a year without problems—they are quite resilient and I suspect RPM throttling hurts them the most, not constant spinning.

Other issues some might find distressing would be hard drive wear (again unlikely as heads are often parked if not in use).

Truthfully, the only surefire downside would be the increase in power draw, but other than that, no, no ill effects or failure to hardware will occur.