Output changes wildly with input voltage in photodiode circuit
as you have used the 1.8K resistor in second stage amplifier but in first stage it was 3.1k so as per the formula G=1+(Rf/Rin)

The gain for second stage is greater than the first stage.