The flexible SERS substrate has attracted numerous interests due to its potential function of in situ detection of contaminants in various emerging applications. Here, we develop a facile and cost-effective layer-by-layer transfer strategy to fabricate a flexible SERS substrate by assembling gold nanospheres (Au NSs) onto a polystyrene microsphere (PS) array on PDMS. Importantly, this technique requires no large-scale instrument and is easy to operate with high reproducibility and tunability. Specially, the sizes of Au NSs and PS were systemically adjusted to optimize the SERS performance of the 3D flexible SERS substrate. Moreover, the layer-by-layer transfer method allows for patterned assembly, and the morphology of the nanocrystals as well as the material of the substrate can be flexibly regulated. Benefiting from the high sensitivity, good homogeneity, and time stability of the 3D transparent SERS substrate, the in situ measurement and quantitative analysis of fungicide residues on the surface of fish was successfully demonstrated without any requirement of sample extraction. As a result, this layer-by-layer transfer technology provides a route for the formation of a 3D flexible SERS sensor with promising applications for in situ and real-time detection of pollutants.