Looking at this, I'd leave only one RAM stick and test it on each slot in that iMac and see if anything changes, then try again with the other RAM stick. Just as Doq said, it's very possible for RAM sticks to fail. I had a situation on a machine where it appeared that out of three RAM sticks, only one was fully functional while one of them was detected but seemed to be faulty and the last RAM stick was just totally dead. Only one RAM stick ended up being fully functional.
If you still have graphical issues after testing both RAM sticks individually, I'd just go ahead and get some cheap compatible replacement RAM that works or pull some out of another machine to see if that makes a difference.
Just as Doq mentioned, the graphics or the logic board failing is possible. I would not totally say this is the case though just yet but it is very much is a possibility.