Madison is a terrific, stable town. I lived in two places there and wouldn't mind being there again if I were looking to move. It's the kind of town I'd be happy to see my kids settle down and raise families.
This site has all the demographic data you need.
Like many towns, it has different sides, literally on opposite sides of the tracks. Very expensive homes on the southern side up on the hill, and more moderate homes in different sections. It also has three colleges very nearby, making it a true college town. (FDU is actually in Florham Park but the main gate is in Madison, next to St. Elizabeth which is technically in Morristown and not far from Drew, which is in Madison proper.)
I'm not aware of any concern about undocumented residents. You may be thinking of Morristown, where the former mayor wanted to have his police act as immigration officials.
My only gripe is the cost and availability of parking to catch the train to New York.
Rhys