In this study, we utilize simple light-emitting diodes (LEDs) and photodetectors (PDs) combined with an intelligent shape decoding framework to enable 3D shape sensing of a self-contained flexible substrate. Finite element analysis (FEA) is leveraged to optimize the LED-PD layout and enrich ground-truth data from sparse to dense points for model training. The mapping from light intensities to overall sensor shape was achieved with an autoregression-based model that considers temporal continuity and spatial locality. The sensing framework was evaluated on an A5-sized flexible sensor prototype and a fish-shaped prototype, where sensing accuracy (RMSE = 0.27 mm) and repeatability (Δ light intensity < 0.31% over 1000 cycles) were tested underwater. We validate an affordable alternative to FBG sensors with high-order sensing outputs, where demonstrations are supplemented in the below videos.