Sorry, hard disagree.
It was a well written character up until the film decided to make the Riddler go from someone that had clearly defined motives and reasoning behind their actions, with a hyper degree of focus(which also negates the notion the Riddler is just "irrationally crazy") to servicing Robert Pattinson's Batman character arc via writing the character in service of that plot instead of any established precedent the film had set forth.
The Riddlers motives all movie were calculating, clear, and concise toward seeking vengeance on the perceived perpetrators of his core trauma from his youth and seeking to target those in particular he saw as personally wronging him. Done with a serial killer like obsession and precision. A thought provoking contrast to The Batman's own misguided seeking of vengeance while also challenging the audience by subverting many of the Batman tropes and taking a slightly harder look at capitalism without the Nolan-style apologetics.
Then, instead of going further and exploring those ideas or the character to its natural conclusion, the film pulls back, pivots, completely abandons the Riddler's established character motives and turns the Riddler into a cheap prop that sets aside everything the movie established about him and just turns him into a super villain hell bent on destroying Gotham. Persumably because the writers wanted some sort of catalyst event to break The Batman's vicious cycle of vengeance and to see the light so to speak. But the problem with the third act is that it achieves that by creating a scenario that 1.) Doesn't really feel appropriate in this comparatively grounded movie we've established for nearly three hours, and 2.) does so by just abandoning what the movie had established about the chief villain to quickly get us there and create cheap shock value.
The most immediate comparison that comes to mind is when GoT just sort of heelturned Dany into a murderer of innocents without actually establishing that character leap, but clearly done to service getting the story to where the writers wanted it to be.
You are overthinking it, The Riddler made a game out of his delusions that ultimately ended with his plan of flooding Gotham. One could argue that was always his real goal or just the ultimate fail-safe in case everything to did not fall into place (even he did not see he wouldn´t be able to get Bruce Wayne by the time he turned himself in). Above all, he did not give a shit about anyone in the corrupt city of Gotham, all he cared about were his followers and Batman who he believed to see his psychotic ¨truths¨. Like he said, it was a parting gift for his followers to have their ¨time to shine¨ when he was safe and away from the destruction of Gotham.
But his intentions were to create fear and panic in the city, just as Batman did for the criminals. Except Riddler saw most of the citizens as corrupted by how things are in Gotham. It made complete sense that something o catastrophic was woven into his clues right from the carpet tool that is focused on in one of the earliest shots in the film. The final act is a stark reminded this is still a blockbuster superhero film as well, Batman is too big to end on a note that doesn´t have him against impossible odds.