I'm assuming by your avatar and your mains below your avatar that you're a Roy main and a Marth secondary? That's actually pretty good, since I'm a Marth secondary myself. Yay for personalized advice!
When I encounter really projectile-heavy opponents online, I go all out offensive on them. Most spammers cannot deal with offensive pressure of any kind. I'd say your best bet is to use low-lag and high-range aerials like short hop forward or neutral to dodge their projectiles and pressure the opponent, and when they're panicking, try reading their actions. If they're going to roll back when you're near them, hit them with a dash attack or a slide smash. If they're going to roll behind you, use a down smash. If they're going to forward smash, wait it out in a shield and then grab them. If they're going to grab, spot dodge and either hit them or grab them back. Spammers tend to rely on their powerful moves close-range, and their fast projectiles when afar. Take advantage of this by using moves like forward tilt, jab, or down tilt to flinch them out of their smashes.
When you're up against these people, don't be afraid to take risks to learn their habits. Just like their main style of play, they're quite samey. Try cornering them into an unfavorable situation, and then see how they react. A good rule of thumb against these kinds of players is that if they react one way, they will likely do that action again when in the same predicament. (Of course, this is just for spammers. Against other players, be prepared for mixups.) When they see that you countered their strategy, they will either attempt it over and over again in hopes that it will work eventually, lose any kind of rhyme or reason to their playing, or try a new strategy.
If you'd like, you can add my NNID and practice with me, send me replays, etc. and I'll be happy to give you further assistance!