LED as light sensor not properly working in circuit
Photo current available from LEDs is tiny. When used in photo-voltaic mode as is done here, a very high-impedance load is required, else measured voltages are reduced. Where you measure 300 mV across the LED with a 10 Megohm voltmeter, LED current is only 30 nA.

Your initial tests on the bare IR LED, using a high-impedance voltmeter (10Megohm) are typical, and suggest that the LED is operating correctly.
The path from a remote LED to microcontroller input pin can be tested in two stages to determine where those tiny photocurrents flow:


LED + wires to microcontroller
Microcontroller input pin leakage.


Try disconnecting microcontroller input pin. Its leakage current could represent a loading resistance that sucks LED current. Measure LED voltage with a known light source, with microcontroller input pin disconnected.

Microcontroller analog input ADC resistance is specified as "typical" 100 Meg ohms (10X higher than many digital multimeters). Leakage current on a I/O pin is "typical" 50 nA at room temperature, but at high temperature leakage current could be as high as 1000 nA. Your LED is generating currents of similar magnitude - microcontroller leakage could easily be the cause of reduced LED voltage.

Be aware that a long path between LED and microcontroller input pin having high impedance should be avoided - the extra capacitance will make response time slow. And those high-impedance lines allow noise to find its way in. Each and every connection point is a potential leakage path. A high-impedance buffer stage next to the LED would help avoid these problems. A JFET source-follower would be appropriate. A CMOS rail-to-rail opamp could perform a buffer function instead. If an opamp is used, a trans-impedance circuit (requiring only one extra resistor) can provide gain, and low output impedance too. However, these buffer solutions require a third wire to power the buffer.