Hmm, about Yungoos and Rattata, I'm not really sure if the games want us to read them as a bad thing. I know it seems like a really misguided way to portray invasive species in the context of the real-world inspiration for the two lines, but it's worth noting that in-world, they're never actually suggested to cause direct problems for other species (which is actually a pretty big deal in Alola in particular, which is all about showing the "cruel side" of nature in many, many other cases).
While the real-world basis for Yungoos went on to threaten other species, we're told that they still mostly eat Rattata despite the, uh, schedule conflicts - Gumshoos is even suggested to be pretty particular about this: "Gumshoos has a tenacious personality, which is why it targets one prey for so long without wavering. But when the sun goes down, it runs low on stamina, falling asleep right on the spot. Gumshoos can withstand a great deal of hunger. It’s able to stay perfectly still while waiting for its prey, keeping watch without eating a thing." It doesn't seem like they did just give up and start targeting other species like real mongooses did, and since the only reason they were brought over in the first place is because nothing else was preying on the Rattata, they're not really competing with other species, either.
Meanwhile... and this is actually a somewhat bigger one... Rattata are only ever cited as being a nuisance for people - they live in urban areas and steal food from human homes and restaurants - and not other Pokémon in the wild. But I think this dynamic actually captures something that Alola is trying to promote: in the present day, Alolan Rattata and Raticate have adapted to coexist with people by filling a unique and mutually beneficial niche. We know from various Pokédex entries that they've started to cooperate with each other, and while wild Rattata are still sometimes pests for humans, there's also a Ratatouille-esque relationship where people rely on Rattata and Raticate to distinguish fresh ingredients and they've actually become both employed and used as a sign of prestige by restaurants.
All in all, I think both sides of this relationship are meant to be conveyed as harmless, and we're meant to see Yungoos and Rattata as a positive example of adapted species - specifically as a contrast to the Ultra Beasts, in a way that highlights one of Alola's main themes.
A recurring parallel in Alola's story is drawn between those who've adapted to thrive in an ecosystem (literal or metaphorical) by coexisting with the others in it and those who've refused to change, who try to change their environment to suit them instead of adapting to their environment, and who end up destructive in the process. There's a huge emphasis on being able to live alongside one another instead of resisting change.
One of the big examples of this is Guzma vs Kukui: Guzma is someone who couldn't thrive in Alola's trial system, so he dedicated himself to taking it down and ended up as one of the game's main antagonists; meanwhile, Kukui challenged the Pokémon League of Kanto and decided that he wanted to modernize Alola and help its Trials find a place amongst the rest of the world's Pokémon Leagues, so he set out to create a Pokémon League that stayed true to Alola and retained its unique and long-standing Trial tradition while also being able to coexist with other regions and be recognized by the rest of the world, and he's regarded as one of the best role models in the game (there's a reason he's the first professor to act as Champion - he embodies the ideals of Sun and Moon just as clearly as Alder and Iris embody the ideals of BW and B2W2 and Diantha embodies the ideals of XY, in a way that no other professor has quite matched).
The failures of the Aether Foundation are also designed to reflect this. Lusamine's most explicit flaw (and kind of the only one that stayed consistent between SM and USUM, so we know Game Freak thought it was important) is that, even when she thinks (or chooses to believe) that what she wants is what's best for someone else, she doesn't give them a say and just pushes them to suit her whims. When she goes off the deep end in Sun and Moon, she becomes more explicit about actually just wanting a world that's perfect for her, and when she goes after Necrozma in USUM, even knowing that everyone else is against her plan, she's so absorbed in her apparent good intentions that she consciously chooses to ignore them. On the other hand, when we're first properly introduced to the conservationist side of the foundation, Wicke - one of the most explicitly benevolent and genuine people in the foundation - tells us, "Nature does have its own balance, of course. It can be difficult to judge just how much we humans should try to affect it, can't it?" This feels like an acknowledgment of what the Aether Foundation should actually be doing: understanding the world before they change it and making sure that what they do isn't going to stifle what others (people or Pokémon) want or need.
But the reason I bring up this recurring parallel is that the two major new classes of Pokémon in Alola - regional variants and Ultra Beasts - are also designed based on this theme. They both have the common ground of being Pokémon introduced from far away, but at least as far as Alola is concerned, just about every example we have of a regional variant is a positive one - they're pretty much all species that have successfully adapted to their environments and that coexist with people and other Pokémon rather than being destructive. Heck, Grimer and Muk are among the most pollutive and destructive Pokémon in the world, and their regional variant is highlighted as one of the Pokémon that cooperates with humans the best. On the other hand, when the Ultra Beasts are regarded as a threat, it's because they don't really do that - in Sun and Moon, all of the invading Ultra Beasts are said to be stressed by their new environments and are incredibly destructive in their search for a way home, rejecting Alola and recklessly causing collateral damage because it's not the environment that suits them. The International Police also initially rejects them and plans to destroy them, but they, too, are portrayed negatively for it - while Anabel and Looker are the ones who ask the player to befriend them and help them adjust and are portrayed positively for it. And it's honestly incredibly fitting that most players accept them as cute, funny and likable after they're caught - read: after they start cooperating with the people and Pokémon of Alola and adjust to life there instead of rejecting the world around them.
The choice to base a seemingly positive instance of adaptation in Alolan Rattata and Yungoos on such an obviously negative real-world situation is a strange one, but I think, in general, Alola's regional variants are meant to show exactly what should happen when one is in an unfamiliar environment, and the Ultra Beasts (which we've been told are based on "the idea of" invasive species in themselves) are meant as a contrast and what shouldn't. I agree that Yungoos and Rattata are a weird case from an out-of-world angle, but I think they make perfect sense thematically and are consistent with Alola's ideals.