The only difference between a rampage shooter and a terrorist bomber (such as Timothy McVeigh) is in the weapon used to kill. Both aim not at individual people but at groups, social or political institutions, or entire societies.
The thing that strikes me as important is the loner vs. group dynamic. One thing that is certainly happening in western societies is the concerted engineering of more multicultural societies. While there are certainly many reasons why this (and it's associated resistance) is occurring, I suspect the multi-level selection lens is a fairly productive paradigm from which to look for deep causes.
Multi-level selection can posit that western moves to broader multi-culturalism reflect an evolutionary drift to large group orientations. Large group orientations can be adaptive. For example pluralistic societies tend to have lower levels of inter-state warfare. Some of this comes from their focus on rule of law. Some of it comes from increased propensities to see other state's citizens as "non-others".
An increase in group level can be very advantageous. For example the brotherhood of Western Civilization certainly has the potential to minimize strifes between internal parties; after all we're linked by common values. While the evolution to nation state sized groups certainly isn't finalized, the nation state group level has a fairly robust adaptiveness with a strong history of outcompeting lower levels.
The next level up, pan-national state groups (such as the Eurozone, NAFTA zone, etc.), haven't settled into robust adaptive group roles. However, the seed is obviously on the table (& science fiction writers always fantasize about the inevitability of regional mega-states).
Fringe multiculturalism may portend even grander experiments. Just what does western propensity for fanatically broad multicultural truly facilitate (from the multi-level selection lens). The 1st millennial rise of universalist religion presents one potential parallel trajectory. Larger group orientation may be signalling the attempted rise of an alternative world universalizing religion; however this one operates under the banner of secular progressivism/humanism rather than the quaint flying spaghetti monster mold. But every (religious) push creates its own demons...
Which brings me rather circuitously to Peter Turchin's blog series on rampages. If there is a felt push to higher adaptive group levels (which by definition outcompete lower group levels), then it seems natural to have blowback against this. I'd suggest some of the surge in rampages may be due to non-group loners raging against the machine of groupishness. Not only is there too much groupishness, current formulations amorphously portray everyone embracing everything. This absolutely smothers the maladjusted lone rampager. Groupishness explicitly says you have to belong. There is no safe space for non-belonging because everything is (amorphously) accepted/owned. You absolutely will be part of our group.
Most, but certainly not all mass shootings/attacks seem focussed on venues and populations that portray strong group attenuations. Has the pressure for groupishness become so substantial and pervasive that socially maladjusted loners vent their nihilism purely to destroy sacrosanct groupings? Purely to destroy group adaptiveness in order to save space for the loners that can't function at any group level? I'd strongly suggest that the rise in rampages is tied to a rage against groupishness by those for whom groupishness will never work.