I think him being brought back as an Edo before Rinne tensei is what is confusing everyone.
I guess it's because Madara's real body was rotten and decayed somewhere. But his eyes were preserved and still usable. So in a sense his eyes were still alive. So when he got brought back with Rinne Tensei, Rinne Tensei was able to recreate his decayed body, but it couldn't "recreate" his eyes because technically his eyes were still preserved. In a sense, his eyes were still alive, so Edo tensei couldn't "revive" them so to speak.
Think of it this way. Granny Chiyo died. And was brought back to life. Let's say that before she was revived, they took out her eye balls. It wouldn't make sense for her to be revived with a new set of eyes in her head. She would be revived, but without eyes.
Now as far as him coming back to life as a younger version of himself, I believe that is because while his Edo body was technically dead, it still counted as a living body for Rinne Tensei purposes, because Madara's soul was still inside a vessel (which technically means he was living). So when Rinne Tensei brought him back for real, it gave him his young body because his young body is where his soul was last kept.
So to put all this together, Rinne tensei will either revive you by recreating your old decayed body parts, or it will revitalize your already existing body. Technically Madara's young Edo body was an exact replica of his real young body, and since his soul was already in it last, that's what Rinne Tensei revived. The eyes did not come back, however, because the eyes, unlike the body, weren't actually "dead"