To me Madara is the most undeveloped character , he is poorly written and the ending he got confirmed that Kishi was getting tired and tired of him . Madara is a character with no 'motivation' , one-dimensional guy who only craves for Hashirama's wood and power . His arrogance was off charts anyway , too much arrogant so his ally backstabbed him while saying 'I am the saviour of this world' , while in fact he was just a tool .
Undeveloped? Go back and re-read the chapters when Hashi was telling their story. Apart from Nagato, Madara is the most well-developed villain of this series. You saw his story, his initial friendship with Hashirama and his resistance of his clan's violent nature. Eventually, his clan broke his spirit and he gave in, and then his most beloved brother was killed, reinforcing his decision.
Then we saw him back out of his request for Hashirama to kill himself or his brother, proving he still cares even when his pride is hurt the most (he had just been defeated). He founded Konoha with Hashi, but never quite found inner peace because of his losses and because Tobirama and others still hated him and his clan. And that's why he decided to make his own plan for a peaceful world.
How is that undeveloped?
As opposed to "my 13-year-old crush died, and even though I still had other people that loved me and a new best friend, I'm gonna listen to this random creepy old guy I just referred to as 'death' a few days ago because plot"