I understand a piece would be better to just use D and not Ebb [in the key of
C major] 99% of the time, but we're talking theory here.
Then let's talk theory. Theory should explain "why" it would be used or not used.
What does it mean to be diatonic? It isn't just a collection of frequencies, it's a collection of named pitches using the gamut of letters
ABCDEFG, which creates the important sense of steps between scale degrees. When everything is spelled correctly the scale degrees are separated by steps and those steps then have functional, tonal, and modal identities within the scale.
When you use accidentals the diatonic purpose is to either change the tonal center - the tonic, even if it's just implied - or the mode, and that changes the function of the changed tone.
If we take away the specifics and just ask "what do flat type accidentals do?" We can say they normally lower tones to create new subdominants or change major mode to minor. In the specific case of a double flat, we can also say the tone being lowered must already be some kind of flat.
So, with an
E double flat we are starting from something that would already be a flat, an
E flat, and then we have lowered it to become either a subdominant or a minor mediant.
E flat is the subdominant of
B flat major, so
E double flat is the subdominant of
B double flat major.
E flat is the minor mediant of
C minor, so
E double flat is the minor mediant of
C flat minor.
In either case, it would obviously be easier to not use theoretical key signatures and spell our tone as
D natural to be the subdominant of
A major, or the minor mediant of
The interesting thing is the
E double flat/
D natural in those two cases isn't the only accidental involved with the changes. A
G sharp would be important for the change to
A major, and an
A sharp would be important for the change to
B minor. Both of those involve black keys on the piano, and in
C major would require accidentals. It's hard to imagine what would prompt someone to then notate that white key above middle C as an
E double flat!
The only reason I can think of for such odd enharmonic spellings is hypothetically using an accidental without a sense of functional reason, or not understanding key signatures and spelling chords in thirds.
I suspect the question arises, because in the specific case of
E double flat in
C major, the enharmonic is to a natural tone, a white key on the piano, and those white key sort of always seem diatonic. If the scenario were, for example
G sharp, in
F sharp major, respelled as
A flat, I wonder if there would be the same sense of
A flat is diatonic to
F sharp major?
Bottom line: if you have introduced an accidental, you are not in the same place you started. You have either changed mode or tonic, and that resets the notion of what is diatonic.
Enharmonic equivalents will both be diatonic somewhere, but not in the same place.