I'm not sure what the clause is called, but it usually describes something (such as Satan). I would think it's "whom" because, in this context, everyone is imagining him with horns. They don't imagine he with horns. That's how I reason it, but it's confusing at times.
What if it were: "...Satan, who/whom everyone imagines has horns"? Would you use "who" or "whom"?