Yes, there are people in this world who have both gigantic egos yet are pretty insecure. It's confusing, I know.
So far I've only run into men with this issue. That isn't to say there aren't women like this, but I can only speak from my own experience.
People who suffer from this phenomenon are exhausting to please. They think the world owes them while simultaneously believing they're no good.
I first became aware of this when I dated a guy who was just a walking conundrum. He had little to no self-confidence and put himself down constantly. I just assumed he was an insecure person, but suddenly there was a change in his demeanor.
While still possessing low self-esteem, he then boasted a sort of God-complex. He would believe that girls at school were flirting with him, then turn around and complain about how ugly he was. When discussing our relationship, he both believed he deserved me yet considered me to be completely out of his league. I mean...what?
This came with some serious drawbacks. He was grateful for the time we spent hanging out together, yet he believed I should be happy with just staying in and watching Netflix all the time. However, he would still constantly whine about how I was going to find someone way more fun than him even as he refused to actually plan dates.
Since then, I've met plenty more people like him. I think about this attitude a lot, mainly because I can't come up with an explanation for it.
But here's my advice; if you happen to come across someone like this, keep your distance. I promise you, they're not worth the hassle and confusion.