I thought about having the underside of my roof done. My attic is HONKING HUGE and the temp was hitting 165 to 170F last summer! Even after putting on a new roof with ridge vents, I still had a sea of stale hot air up there. As I said, I thought about it...until my estimate was starting at $20k. So I instead opened up the from front gable above my garage (removed it and refurbished it...why it was closed, no clue), made one for the back of my house above my patio roof and put a huge automatic gable fan in it. This sucks the stale air out. I also put a box fan on a timer behind the one in the front, that pulls fresh air in. This brought my temps down to the 130's. I also added 1" of R6 foam board to the out sides of my attic portion of my split AC. My electric bill last summer was hitting $525 a month...this dropped it down to around $315 a month this summer. I also tinted our windows and put some solar screen up.
If money was no objective, I would indeed foam spray the attic ceiling.