I'm used to the first couple frets being sharp so I'm not sure why yours are flat, but otherwise it's very common. It's pretty much impossible for a fretted instrument to have perfect intonation - it's always a compromise.
Since it's an electric guitar, you can individually adjust the intonation of each string any time you want. This is done at the bridge and almost all electric bridges have adjustable saddles. Do a web search on how to set intonation for your type of guitar. Some sources will talk about comparing fretted notes with open notes or harmonics by ear, but I like to just use a digital tuner.
There are other factors that affect intonation, including neck angle and neck relief. It is worthwhile getting a professional setup done on your guitar from time to time. New strings will have better intonation and some brands are more even along the string than others.
No matter what, there will always be some frets that are a bit off. There are special nuts available called compensated nuts that try to get just a bit better intonation, but even with that investment it's still not perfect. And if your guitar is more of a budget model, the fret placement and neck geometry may be less precise.
Finally, you will start to notice several differences with changing tunings, including intonation. Intonation is set with a specific tension and string thickness, so when one or both of those changes, the intonation changes. Generally thicker strings will show better intonation but of course are harder to play. My rule of thumb is for every whole step I tune down, I go up one gauge in string thickness to compensate for the reduced tension. Now if you want the best performance with dropped D tuning where you are only lowering one string instead of six, you'll want to get a mixed set of strings which is kind of a pain and a little more expensive. Another thing you can do to fake it is to slightly tune the low D to make it in tune at the fifth fret instead of open. This might depend on where on the neck you are spending a lot of time.
Yeah it's a jungle out there. Learning to tune and intimate is like learning to play and it takes time and practice. A high quality digital tuner is also a good investment, as is working on your finger strength to be able to go up a guage or maybe two. When I'm in shape enough to play 11s I'm really happy with it.
Oh I almost forgot: If you have a floating trem on this guitar then that's another can of worms entirely. That will definitely magnify intonation changes that come with drop tunings and it will make it a lot more time-consuming to set the intonation in the first place.