It's explicitly stated by the narrator. K (Vice's master) from Ultimo buys impressive vehicles and weapons to make up for his low intelligence and lack of physical power.
Uzu Sanageyama of Kill la Kill wears a uniform with three large metal spikes jutting from the belt, and his Nudist Beach attire has three suggestively placed guns instead of the usual one. Now combine that with his canonically confirmed "size", and you got a guy covering for some obvious insecurities.
Deadpool: Hey, y'know what money can buy? A solid gold gun. That shoots diamond bullets. I call it "The Compensator". Whatta ya think?
Herr Starr from Preacher develops an obsession for large handguns after he gets his junk bitten off by a trained dog. He poses in front of the mirror holding one in front of his crotch and goes: Doom cock. DOOM COCK! DOOOOOOM COOOOOOCK!!!!!!!!!
In Doom Patrol, one minor villain was an impotent man with a... size problem... who designed a phallus-shaped multi-purpose crotch weapon and dubbed himself "Codpiece" before a short-lived crime spree
Subtly lampshaded in the second issue of Volume 4 of Atomic Robo. Japan's real-life Super Sentai team has a giant rail gun, and this exchange occurs in the same panel as a shot of it being delivered by an equally-giant helicopter:
Pilot 1: <Careful, wind's acting up.>
Pilot 2: <Compensating.>
Suicide King, a villain from X-Men 2099, is a dwarf who loves huge Hand Cannons. X-Man Metalhead asks if he's compensating for his "size", but the King takes it in stride — apparently he's heard that one before.
Minor Superman villain Barrage constantly gloats about his massive Arm Cannon. Maxima asks, "Why do so many Earth males measure their masculinity by the size of their weapons?"
Sad variation in Hivefled; Eridan was sleeping around as much as possible with the fleet to compensate for the fact that he found sex repulsive and terrifying, and if anyone suspected he wasn't perfectly normal he would be killed.
Trixie likes to take potshots at the villain, Lord Umbra, with this remark in Unlikely Allies, referring to his imposing fortress and the immense beast he commands, respectively. He has plenty to compensate for, actually. Se also thinks that Twilight is compensating for something else with her massive magic power.
There's a rather long monologue in M. Butterfly (a Deconstruction of Madame Butterfly and many Asian Stereotypes that's very vaguely based on a true event) related by the protagonist that his ex-girlfriend said that boils down to this: "Big Cars, Big Buildings, and all the great, big inventions are done by the guys with the smallest dicks."
"Say I'm a guy with a small weenie. I'm gonna take over this BIIIIIIIG country, or build this really TALLLLLL building, or write this really LOOOOOOOOONG book, so the other guys don't know, right? But the problem is, you're still wearing clothes, so you conquer the country or whatever, but you're still wearing clothes, so no one can prove who has the bigger weenie."
Even mentioned in James Cameron's Titanic, during a scene in which one of the boat's backers is bragging about the ship's capabilities, claims which our heroine Rose greets with some skepticism. "Do you know of Doctor Freud, Mr. Ismay? His ideas on the male preoccupation with size might be of some particular interest to you."
In Undercover Brother, after noticing the size of Undercover Brother's car, hair, and jewelry, Sista Girl believes that he is "overcompensating for something." And of course, there's the matter of his "big, black, fuzzy balls" hanging from his car's rear view mirror.
Connie Swail:(who has just been rescued from becoming a virgin sacrifice) How come his is so much bigger than yours? Officer Joe Friday: Miss? Connie Swail: The gun. Officer Joe Friday: I've never needed more.
In the first sequel to Police Academy, it is revealed that gun obsessive Tackleberry is still a virgin.
In Taken, Liam Neeson's character implies this is what his ex-wife's new man is doing when pointing out all the ways to rescue the girls that involve him utilize his wealth.
In Iron Sky, the female commander of the U.S. fleet utters "That guy has to have the smallest dick in the world" when she sees his gigantic moon fortress.
The entire message of Dr. Strangelove in one sentence: "Men make war to prove they have big dicks and it'll destroy the world now that there are nuclear weapons." In particular, General Ripper launches World War III specifically to compensate for his own sexual impotence, which he has blamed on the Soviets using Insane Troll Logic.
In Freddy vs. Jason, Kia tries to distract Freddy by trash talking him. Among others things, she says that the knifes on Freddy's glove are probably his way of compensating for the obvious. She also notes that in contrast to him, Jason wields a huge machete instead.
What Tony thinks about all the guns strapped on the War Machine armor in Iron Man 2.
Adrian from Pain and Gain, who gets involved to pay for ways to make his penis work again.
Death Proof. Lee and Abernathy watch Stuntman Mike burn rubber out of the service station in his Dodge Charger R/T 500 and conclude, "Little dick." Given that he gets his kicks by killing women with his car, and is later shown sitting with the hood ornament between his legs, they may be right.
There is a joke about a man who wants to buy a gun. He tries every model in the shop, but always finds something wrong - not big enough, not shiny enough, wrong balance... In the end, the shop owner gives him a note and says "Here is my brother's address, he can help you." Once the man leaves, the assistant asks "Who's your brother, a private armorer?" The owner says "Nah, he's a sexopathologist."
Used hilariously in The Dresden Files: Harry has a standard revolver (it's really the only gun he can use), while Psycho for Hire Kincaid has an entire trunkful of weapons of all different sizes, all clearly built for this exact sort of mission. Harry looks at Kincaid's guns, looks at his gun, then looks Kincaid in the eye and says "My dick is bigger than your dick."
A Song of Ice and Fire. After Queen Cersei burns the Tower of the Hand, and the new Hand announces that he's going to build his own tower twice as tall as the old one, she jokes that maybe he's hinting at something.
In Shibumi, we have this passage:
In his experience, Hel had found that only older North American drivers, with the long distances they habitually travel on good roads with competent machines, have become inured to the automobile as toy and as manhood metaphor. The French driver's infantile recklessness often annoyed him, but not so much as did the typical Italian driver's use of the automobile as an extension of his penis, or the British, driver's use of it as a substitute.
In Jingo, Angua says "You know what they say about men who like big weapons." Her boyfriend Carrot says he doesn't know what they say, and Angua says, "They're, er, rather small." Carrot still doesn't get it and thinks she's referring to their height, since dwarfs and short watchman Nobby love big weapons. (Specifically, he says dwarfs love a big "chopper" ... one of those points where the reader wonders if Carrot is really as naive as he lets on.)
In Noob, the second novel only Mauve Shirt Shaadö has has a two-meter long BFG. Later, Omega Zell, while asking about him, refers to him as (paraphrasing) "the guy with a big gun who, if you want my opinion, must have been compensating for something".
In The Man with the Golden Gun, M reads a psychiatric report on Scaramanga speculating that he uses a Hand Cannon because of his ambiguous sexuality. Which explains why the manly James Bond only has a Beretta .25 at this point in the novels. Bond does keep a long-barreled Colt .45 in his glove box though; does that imply he might 'come out of the glove box' some day?
A Mage's Power: Because Culmus carries around a BFS, he is subject to many of these jokes. When Tiza makes fun of him for joining a joust (and using a lance), Basilard tells her to knock it off.
In the Cheers episode "From Beer To Eternity", Diane confronts Gary, the arrogant rival of Sam's who has made it an obsession to prove his own bar as superior to Cheers. In a polite and classy "The Reason You Suck" Speech which for the most part consists of rebuking him for choosing "silly competition" over art and music, Diane innocently throws in a speculation that "perhaps you are compensating for some physical shortcoming"....
On Top Gear, they stick nearly all flashy supercars in the "Uncool" section of the Cool Wall for this very reason:
Jeremy Clarkson: Let me put it to you this way: you would have to have literally no penis at all to buy a car like that. [...] The flashiness of your car is inversely proportional to the size [of your penis]. James May: Is that right? And you're saying that to a man with a 1.2 litre Fiat Panda? Mister swollen-wheel-arches Mercedes CLK Black. Richard Hammond: He does have a point there. He does... Jeremy Clarkson: You've got a Ford Mustang! Richard Hammond: Let's move on!
Hilariously, the Hummer H3, one of the most flashy and preposterous cars they ever had on the show, ended up being an exception to this rule because it was a giant middle finger to political correctness and it pissed off environmentalists.
One episode of A Bit of Fry and Laurie has a hospital patient who has just had his genitals removed. The doctor, in order to help him cope, gives him a pet Doberman, a rusted white van, a subscription to Guns and Ammo, and a lot of camouflage clothing, telling him that it's standard policy. This joke doubles up when the patient complains about needing to urinate. The Doctor's response? If he drives around in that car, in those clothes, with that dog, people will be taking the piss out of him all the time.
In the reboot series of Doctor Who, the Master's "Laser Screwdriver", longer, thicker and more dangerous than the Sonic Screwdriver. It's never brought up in the show, but the producer claims that on the first day the prop was brought on set, he received a text message from David Tennant saying "His screwdriver is bigger than mine".
When the Eleventh Doctor meets his earlier incarnation in "The Day of the Doctor", they whip out their sonic screwdrivers to establish each truly is the Doctor. Ten is disconcerted to see that Eleven's sonic screwdriver is bigger and fancier than his, even after he extends the tip.
In an episode of Friends, "The One Where They All Turn Thirty", Ross buys himself a sports car:
Ross: How hot do I look in this? Huh? Chandler: Ross, a sports car? Wouldn't it be cheaper to just stuff a sock down there?
In the episode "Night Of The Nearly Dead" of Father Ted, the character Eoin Mc Love is an arrogant manchild who gets what he wants regardless of the effect it has on other people. Eventually, his PA makes him apologise and he confesses to Ted and Dougal: "I haven't got a willy".
Noah's Arc: This exchange between Noah and Wade in the first episode:
Noah: "Wow Wade, thats one big truck. Hope you're not compensating for anything."
Wade: "Nah playa, it's all good in my hood."
Buffy the Vampire Slayer - in "The Zeppo", Xander, trying to establish a cool identity for himself, shows up at school in his uncle's flashy '57 Chevy convertible, referring to it as "my thing". Buffy asks "Is this a penis metaphor?"
Subverted in the studio version, which features a monologue in which the singer points out that there is absolutely no correlation between his lack of genitalia and his ridiculous levels of awesomeness.
In Low Life, this is the name of an Edge which grants a bonus to Spirit rolls whenever the character in question is wielding an oversized weapon.
Averted in Warhammer 40K as far as orks are concerned: True, they fervently believe Bigger Is Better applies to every aspect of their lives, including ridiculously oversized guns and vehicles, but seeing as they reproduce asexually, there's nothing to compensate for (indeed, they reproduce by dieing, so their oversized guns tend to help with that by making them priority targets).
Nimrod: We're of one tribe and one language and we can do anything! That is why we're building a tower to God! Caphtorim: Oh please! You're building that tower because you have a teeny weenie.
In classic Greek play Lysistrata, the men of Sparta and Athens are portrayed as fighting with each other because of this, and all the women decide to hold a sex strike to get them to stop. Notably, the original play called for all the male characters to wear oversized phalluses as part of their costumes, the implication being that they're doing all their thinking below the belt.
When looking at Richtofen's portrait in the Kino Der Toten map of Call of Duty: Black Ops Zombies, the player's character can be heard saying, "His portrait's bigger than anyone elses. Must be trying to compensate for somethin'."
Admiral Vigoro in Skies of Arcadia just oozes this trope. His flagship, The Draco, has a giantcannon on it that looks sort of like... Yeah. His main taunt before his ship boss fight starts is that said gun, in his own words, is "bigger than yours." Aika loudly suggests that he has a complex and is obviously compensating for something.
The Brotherhood gang of Saints Row 2, fans of excessive tattoos and big cars, use a giant truck called "The Compensator".
In Mass Effect 1, Joker seems to make a snarking comment about it when his tiny Normandy passes the absolutely homongous Destiny Ascension by saying that "size isn't everything". But he then clears it up that he didn't meant to imply that he was feeling inadequate, but that the Ascension's firepower is even more impressive.
Daniel: And what's with that ridiculous sword anyway? It's like a huge slab of iron! Sick: He's compensating.
Naoto of Persona 4 is a rare example. Naoto is actually a girl, who both dresses up and acts like a boy as she feel that her being a private detective would be ridiculed by the authorities due to gender bias. Her shadow manifests as her desire to be accepted for who she is, and attempts a (possibly fatal) gender change operation on Naoto. It doesn't help that her Persona, Sukuna-Hikona and its evolutions, Yamato Takeru and Yamato Sumeragi, have extremely long swords compared to their small bodies. Not to mention they based on male legendary figures, making her the only one in the game that has Persona not in a same gender.
Salvador, the vicious "Gunzerker" of Borderlands 2, stands at a tiny 5'4" due to steroid abuse stunting his growth. His ability to wield Guns Akimbo is called "gunzerking", and he knows exactly what it looks like. "TIME TO COMPENSATE!" Whether he's compensating for his height or that other thing is open to interpretation.
"SCREW YOU FREUD!"
In Halo4, The Mammoth is the size of an ocean liner, with wheels the size of houses, and the biggest gun right on top of it. Cortana being Cortana...
Cortana: Well. Someone's overcompensating.
In Zap Dramatic's Move or Die, Wilma suggests that the nursing home guy needs a gun to compensate for "a lack of firepower elsewhere." Predictably, he attempts to shoot them for it.
This idea permeates just about everything to do with the sleazy stripclub owner/porn czar Mars from Broken Saints, from the way he talks to (surprise) his gun.
Kevin & Kell has had fun with the SUV and this trope on a couple of occasions, including one that was owned by a flea (don't ask how it could reach the wheel and the pedals at the same time, please), prompting a comment about "The bigger the car, the smaller the man", and Ralph Dewclaw, who was obviously compensating for his complete lack of hunting-ability.
ObviouslyCompensatingForSomething Man of the subcomic Jailhouse Blues sports "More Ammunition than God" as his special power, and was defeated by Yo Momma Man's Jazz's Smack Talk power regarding his... deficiencies.
Done in the main comic, also; upon seeing Wily's gigantic fortress, a character remarks that he must be compensating for something. When he targets them with an absurdly large laser cannon (shaped suspiciously like a phallic symbol), one says "He IS compensating for something!"
After the character Dive Man destroys the cannon, he says something along the lines:
Dive Man: Did I symbolically castrate you now?
Girl Genius implies this about the Wulfenbach household here, in particular taking note of the giant floating Castle. There are lots of jokes about this in general, involving "death rays" or "tool belts".
Dot's nottink. One of participant brought to the assault on Mechanicsburg troops riding something between a Walking Tank and the lower half of Powered Armor. That is, "vehicles" looking like wide pants... with a big gun set on the fore end.
Is mentioned once in Beyond Reality in regards to Orion's BFS, as well as having much of the fanart (especially about the time a dragon snapped it in half) talk about it in a certain way.
"Wow, that gun is pretty accurate for its size." "Well, I don't have to compensate for things like some people."
In The Last Days of FOXHOUND, Vulcan Raven has a pet peeve for "Compensation" jokes made at him because of his weapon of choice. Later on, Grey Fox outright asks him if he's got a small penis, to which Raven responds that he's officially made his death 25% more painful.
In a rare female example, one furry comic called Vitaboob has this as the punchline. The main, female fox girl in it (selling some kind of breast enhancement drug which she gleefully tells you she uses regularly) has ENORMOUS, perfectly spherical breasts bigger than her head, a HUGE poofed out tail twice as long and big as her body, and MASSIVE feathered Farrah Faucett 80's hair, and you kind of wonder why she needed her breasts enlarged in the first place... except she's like a tiny, little, itty-bitty thing about 4'10" tall. See, she's really small, and wants to make up for it by being as big as possible. What was that Rev. Lovejoy said? "To compensate for my own smallness"? Yeah, she's got you beat there Reverend.
The comic Chaos Campus has a similar female example, in the character Jamie Schaffer, a goth poser who is unusually short and compensates by having massive, cartoonish, 72"-of-inadequacy breast implants.
In the 2860th strip, one guy tries to bring up this trope about someone with a big car, but another argues through a bunch of statistical correlations that the opposite is more likely.
One of the villains in a recent arc of Fans! was a Middle-Eastern property developer who had a tendency to build extremely tall structures emblazoned with his initials on them. When time comes to battle him in the climax, the heroes have difficulty until they hit upon the idea of taunting him for his obvious efforts at compensation. He doesn't take this so well.
The episode where Peter discovers that Chris is well-endowed has an absolutely beautiful riff on this. Peter gets a Midlife Crisis Car that is decidedly phallic, taunts a motorist with a normal carnote "Hey, when you park that thing, does your garage ask 'Is it in yet?', then upon coming to a tunnel repeatedly backs in and out of it...until it gets flattened by an oncoming bus. Which is full of bikini models who laugh at him, causing Peter to hurtfully say "Ow, my pride." The same episode also suggests that everyone in the NRA is a member for this reason.
Also in the episode "Peter's Progress", Stewie (who is a baby) is King Stewart of England. When someone asks Brian why the King is so nasty (which is normal for Stewie), Brian replies it is due to Stewart having an extremely small penis. He describes it as "that one grape in a group of grapes that never really became a grape."
Another episode had a joke similar to the Futurama one below, but with an Obama Monument — which is, of course, at least twice the size of Washington's and pitch-black.
In an episode of Futurama, the crew visits Washington, D.C. We see them fly by the Washington Monument, and the Clinton Monument, which looks just like Washington's except twice the size.
Into the Wild Green Yonder has a television advertisement for the MagnaPhallix three hundred two inch TV. "It's bigger!"
In The Simpsons, Rev. Lovejoy just comes right out and says it.
Marge: Why do we need a church steeple that big? Rev. Lovejoy: To compensate for my own sense of smallness.
Used openly on Robot Chicken, when a dweeb who's shopping for a new vehicle demands something appropriate for a guy with an extremely small penis.
Invoked and parodied in South Park several times, most prominently the episode "Osama bin Laden Has Farty Pants". Its pre-censorship title contained a reference to Osama having a small dick, and in one of the scenes several magnifying glasses focus on bin Laden's microscopic wiener.
A later episode, appropriately titled TMI, did it even better, when Cartman somehow mistakes a height chart on the bulletin board for a measurement of the boy's penises. This leads to a lengthy discussion (by Randy, of course) about how to properly determine penis size. It also lands Cartman and Randy in an anger management group, whose therapy sessions invariably end up with the members defending their genitalia.