Hi there
I think that words can have endless interpretations or mis-interpretations for that matter, and so does the possibility behind your boyfriend declaring that he is 'stupid'.
In any given situation, different people perceive things / words / experiences from different lenses and no matter how much you think about something, or how many people you ask, the best answer you can get is always going to be from the source and from the sender i.e from HIM.
He was the one who said the word, and for that reason no body can ever really tell you what he meant, what were his intentions, or what made him say that word. What other people can tell you is THEIR point of view regarding the situation, which could vary from positivity to negativity, but unless you ask him you are never going to know HIS point of view, which is the one that really interest you.
If you feel that you haven't already found your answer, consider asking him gently about your doubt, and try to make it sound as casual as possible so that he wouldn't feel as though you are interrogating him or something. It is also important to find the right time before you ask him, as well as pay attention to your tone of voice so that it can sound calm, pleasant etc. to send the message accross but at the same time you would be making it nice, clear, short and simple.
When you feel that it is the right time, you could start by saying something like, I sort of have this curiosity.............. and you slip it in slowly into the conversation.
Hoping that you will manage to find the answer that you are looking for.. Good luck to you.
Take care!