This (strong absolute neutralization) is theoretically possible although has not yet been shown to exist. The closest case is Yawelmani, where the phonemes u:, o: are realized as [o:] everywhere. There is a well-known argument justifying the distinction, related to vowel harmony. However, the neutralization only applies to long u, and there are stem-forming shortening rules where /u:/ becomes [u] but /o:/ becomes [o], so the two phonemes are not realized the same way absolutely everywhere – there is a context where they are distinct. (There is also closed-syllable shortening where u: surfaces as [o] – shortening of u: to [u] only occurs as part of stem-formation).
As applied to second-language learning, this raises a question as to abstract competence versus concrete performance, and is analogous to the first-language acquisition problem that children may hear a certain distinction in phonemes but don't necessarily produce a distinction. This has proven to be difficult to verify experimentally, although anecdotally it is "verified" by the fact that adults seem to think that child English r is pronounced as [w] (at least, it sounds to adults less like proper adult r and more like w). There was a study (citation lost in the void) where it was shown that among the subjects that seemed to have r→w by adult judgment, articulation of r and w was nevertheless distinct. Anecdotally, some students of Lushootseed neutralized ɬ to ʃ, so that ʃəgʷɬ was pronounced ʃəgʷʃ (others may pronounce it ʃəgʷθ, keeping the phoneme distinct by mapping it to a different English phoneme). They did seem to know the spelling difference between š and ɬ; maybe their articulation of š-cum-ɬ different from that of regular š.