Your guitar has an intonation problem.
Intonation is the name for the relative tuning adjustment between different notes played on a string. The adjustment is necessary because the frets are positioned based on an ideal calculation which relates string length and pitch. However, when a note is fretted, the string subject to a small bend which raises the pitch relative to what it should be.
The intonation issue affect some strings more than others: those which more easily change their pitch when they are bent require more compensation.
Compared to steel strings, the nylon strings on a classical guitar do not change pitch in response to bending very much, and so classical guitars usually have a one-piece bridge that is ruler-straight, and placed just as far from the 12 fret as the 12th fret is from the nut.
Intonation is affected by action. The higher the string action (distance between the unfretted string and the frets), the greater is the pitch change when the string is fretted. The more you increase action, the more compensation is required to achieve proper intonation.
Intonation is also affected by the use of multiple stops on the string. If you place a capo on a guitar (a simple clamp-like transposition device which frets all strings at a given fret) then the intonation is affected, because all notes played above the capo are the result of being fretted in two positions: at the capo and at the fret being played. This causes an extra stretch, so that the note is slightly sharper than without the capo. If the note being played is close to the capo (like open-chords, transposed by the capo) it's not so bad, but if the notes are distant (solo played high on the neck, with a capo somewhere lower down) it's quite bad.
Intonation is affected by action, and action is affected by three variables: the height of the nut, the height of the bridge and neck relief. Neck relief is a phrase which refers to the deviation of the fretboard from a straight line. You can test whether a neck has relief by using the string as a gauge. Press a string down at the lowest fret and highest fret simultaneously. If there is space between the string and the frets somewhere in the middle, then the neck has relief: the more space, the more relief. If there is no space, then the neck is perfectly straight, or possibly has a backbow (the opposite of relief). The upper bound on useful neck relief is about 1/16".
Neck relief helps with action because it causes the higher parts of the fretboard to curve toward the string, reducing the action. Relief allows the maximum action to occur at somewhere around the 12th fret, and after that to remain approximately constant, which greatly helps the electric guitar player who plays solos above the 12th fret. The higher the action the player prefers, the more relief is needed to achieve this action flatness in the high positions. Because it helps with action, relief also helps with intonation.
The first step toward proper intonation is setting up a decently low action at the nut, bridge and dialing in a desired amount of neck relief. A guitar in this state is optimized for playability, and requires the least amount of compensation for good intonation. Neck relief is configured by adjusting the tension in the truss rod. You can learn how to do this yourself, but there are risks if you don't know what you're doing. If you don't pay someone to adjust the truss rod, spend some decent amount of time reading on the subject before attempting it.
After the playability adjustments, intonation is then set with compensating devices: movable saddles. Acoustic guitars usually do not have these, unfortunately. However, it may be possible to replace bridge saddle pieces with ones which are cut differently, so that their crests are in a different position.
The fact that you hear (and can electronically confirm) the intonation problem right in the first few frets strongly suggests that your guitar's action is a little too high at the nut, at least for the E string. The E string is the thickest, and perhaps isn't fitting very well into the slot of the nut. Or perhaps the nut's curvature profile is not well matched to the radius of the fretboard and frets, giving the E string a higher action. These problems can be examined and corrected by a skilled guitar repair person or luthier who can reshape the nut slot to the appropriate width and depth.
Ideally, a guitar should have very low action at the nut: almost as low as if there was a "zeroth fret" at the nut (something which some guitars do actually have). I say almost, because, by the same token (and this is an opinion) open strings need room to vibrate to produce a loud and clear open string tone without a lot of buzzing. To this end, an open string should clear the top of the first fret by a slightly greater amount than the amount by which it clears the second fret when it is fretted at the first fret.
Excessively high action at the nut is very bad because not only does it spoil the intonation of the low notes, but it also makes basic open chords difficult to play: the very stuff that beginners learn. So a guitar with excessive nut action is a bad beginner guitar! On top of that, high nut action does not buy you any improvement in tone for fretted notes. It helps the open strings ring clearly, but it does nothing for fretted notes other than make them harder to play.
One last thing needs to be considered. It is unlikely, but there could be an issue with your E string itself. Maybe it's just a bad string. This possibility cannot be eliminated until the problem is shown to persist with a different string.