LED not outputting square wave signal
The light output of an LED is dependent on the junction temperature, light output decreases as temperature increases. Even at low currents, the junction temperature will rise slightly. The time constant of your curves is consistent with thermal effects.

https://www.lrc.rpi.edu/programs/NLPIP/lightingAnswers/LED/heat.asp
Unfortunately, I can't find the details of the experiments used to create these graphs. I would assume that a constant current source was used.
To confirm the junction temperature theory, you need to change the ambient temperature of the LED without changing any other variable. Heat would be easier since cold can create condensation. Heat your LED with a resistor (~ 1/2 W in a 1 W resistor) or other heat source and see if the output changes. It will still have a similar spike and curve, but the levels at the top of the square wave should change slightly. At ambient temperature, on your first graph, the voltage peaks at about 3.673 V and after 10 seconds is about 3.627 V.
Be careful not to change the temperature of the sensor, its output probably changes over temperature also.