Two answers (both of which you know):
1) It depends and 2) as long as it needs to be, but no longer.
So how do you figure out how long is long enough?
The other night I evaluated a 4-5 minute speech; the speaker was concerned that a quote she was planning on using would make the speech too long, so I told her to excluded it, and she did. And the speech was still too long. Yes, she managed to fit it into the 4-5 minute window, but she rushed her way through the content, speaking far too quickly than would be comfortable for the audience.
So we conflate fast talking and speech times, but the two are intertwined. If we want to shorten a speech, we think we can just speed up our speaking and that'll do the trick; but it doesn't. It's too much content too fast. So speed is one element; get your voice down to a comfortable, conversational pace. Leave time for your voice to be heard, and the idea to absorbed. Pause a lot.
The notion of making a speech conversational also is a good guide to how long you should make it. Be candid with yourself. How long would you want to listen to your topic, without a break? How would you share the idea with someone you were going to spend an hour over coffee with? You'd probably share it in fragments, right? Make point, get a response. Make another point, check to see if they understand.
You can do the same with on-stage speeches, too. No matter how big the topic is, human nature will dictate that your audience will get restless at around fifteen minutes. Imagine yourself, again, at coffee with someone who doesn't stop talking? Fifteen minutes will seem like forever!
So keep it short. Really, short. Shorter than you feel comfortable with. Much shorter. Compress the most cognizant points into the first fifteen minutes. If you have time allocated to speak longer, say an hour instead, use the rest of that time to find ways to directly engage the audience. Take them on a guided tour of your idea, rather than have them passive listeners.
So there you have it. Fifteen minutes or shorter and only, only, if you're speaking a normal conversational pace. Use the remaining time (forty five minutes) as an exercise in creativity. Prepare questions ahead of time. Create follow up slides and "sub-speeches" on the topic and interject as need. But let the audience have fun for the remainder of the time. That's how long a speech should be: long enough that the audience only has time for fun.