Scalzi says no. Many successful writers are extremely insecure, others write for themselves and feel fortunate that readers enjoy their work enough for them to make a living out of it.
Part of that is that it depends what you mean when you say “successful writer.” What is the definition of success? Material wealth? Excellent writing? Reputation that exceeds one’s own mortality? The thing is, none of these in itself requires a large ego, or outsized egotism. Particularly in regard to the latter two, I have in mind Emily Dickinson, who was certainly an excellent writer and whose reputation in death is far greater than it was in her life, in no small part because her first published collection was in 1890, four years after her death. During life, she lived an eccentric and secluded life — not generally the hallmarks of someone with what’s generally understood to have a pretty big ego.
Is Dickinson a successful writer? I think absolutely: I strongly suspect her work will be remembered long after mine is forgotten. Did she have a big ego? If I had to guess, I would say no, at least in terms of how I think “big ego” is being referred to here.
Ego can be part of the reason people write. It is for me: I rarely write just for myself, since I already know what I’m thinking and I’m too lazy to write down my own thoughts just for me. I write so I can be read by other people; I like that other people like what I write. But there are also people who only write for themselves, who never have the desire to show others their work — at least, not until well after they are dead. Another historical example: Samuel Pepys, widely considered the English language’s greatest diarist, whose diaries, while bound by the author for preservation, were not published until 150 years after his death. Pepys is another successful writer by any account, but save for binding the loose pages of his diary into volumes, where is the evidence of a big ego? I don’t know that Pepys ever dreamed his diary (which among other more significant things includes ample evidence of his various adulteries) would ever see wide circulation.