I will return to my comparative analysis in a bit. For now I want to address the relationship between spell casters, martial classes, and skills in Pathfinder 2.
Historically in most iterations of Dungeons and Dragons casting a spell was a means to ensure something happened and was limited because the skill of play was about knowing which tactical nukes to prepare and when to unleash them. Often spells did the same thing dedicated specialists did better and the job of dedicated specialists was to fill in the gaps between moments of brilliance. Skills and battle field maneuvering were loosely defined so not incredibly reliable while spells were incredibly reliable.
The primary issue with this is it creates an environment where some players could meaningfully exercise skill at playing the game while other players could only rely on fictional positioning. Skill at playing the fiction is absolutely crucial in roleplaying games, but when you have reliable tactical nukes it is often best to rely on them. Basically you could play a spell caster well or poorly, but the same was not really fundamentally true for a fighter or rogue.
Additionally spell casters have historically been generalists with strong tools to cover every arena of play while martial classes had very specific areas where they were meant to excel. You brought a wizard because they could solve the big problems while dedicated specialists filled in the gaps between.
This is not generally how things work in Pathfinder 2. There are no generalists and spells are not tactical nukes. Everyone has defined effects with different costs and attendant risks. While spell casters mostly focus on managing spell slots and focus points, martial classes and skill users interact with the action economy and fictional positioning and time limitations in a much more detailed fashion then most spell casters.
At higher levels a fighter will often 4 or more reactions to manage with only one they can use in a given round and must carefully choose when to use that reaction. They will also have a whole host of different ways they can use their 3 actions to impact the outcome of battle often dependent on fictional positioning and enabling actions like whether they have their shield raised or have a free hand. Also many of the things they do will have a host of negative consequences for failure. While a wizard can just cast Invisibility a rogue will have to find cover so they can Hide and then Sneak to become Undetected.
Do not get me wrong. Spells are still generally have a greater impact than the individual round to round actions of a martial character, but over the course of a given encounter their impact should be similar. What spells a spell caster casts and when they cast them could turn the tide of battle. Generally they won't dictate outcomes and often should rely on the actions of dedicated specialists like the fighter, barbarian or rogue to really make them shine.
Consider Ray of Enfeeblement. On a failed save it inflicts Enfeebled 2 for one minute. This means the target will get -2 to all Strength based checks including Attacks and Athletics based combat maneuvers like Grapple for the rest of combat and also -2 to damage on all Strength based damage rolls. Against a powerful boss monster this dramatically lowers the damage martial characters will receive over the course of a fight.
Consider Sleep. The 1st level version is unlikely to last long, but Unconscious is a powerful condition. It effectively lowers the target's Reflex by 4 and Armor Class by 6. Damage will end it. Combine it with a single strong attack like the Fighter's Power Attack which now against say an Orc Warchief which now has AC 13 instead of 19 so the fighter now gets a critical success on a 13 and hit on a 4. A critical could very well end him. If also catches an Orc Warrior maybe the Rogue or Barbarian get to take advantage of it making the battle much more manageable.
So it's not about creating a balanced game in the sense of everyone getting their moment to shine or equality of outcomes. It's about creating a play environment where everyone brings a character to the table with different strengths and weaknesses where everyone gets a chance to prove their mettle and the party has to combine their efforts to succeed.
Speaking generally martial classes tend to excel in raw single target damage throughput, forced movement, personal defense, and mobility. Individual classes will excel in different areas and the build choices they make greatly impact the resources available to them in play. However it is given to them freely. They can't just do damage all day. They have to earn the right by managing their actions and reactions, positioning themselves, and dealing with things like Resistances and Conditions.
Speaking generally an arcane caster excels at area damage, applying strong personal level buffs and debuffs, overcoming resistances, powerful incapacitating spells that can remove targets from a fight and exploiting weak defenses.
The single target damage spells available to arcane casters can come close to the throughput martial characters put out in a single round distributed through multiple attacks. This is important because many monsters in this game have powerful resistances that are applied once per attack. Additionally due to the versatility of damage types available to them arcane casters can generally avoid dealing with resistances altogether. This often allows them to exploit weaknesses to do more damage.
Arcane casters have to many strong personal level buffs like Magic Weapon, Blur, Invisibility, Knock, Enlarge, and Fire Shield. Many of these are tuned to allow the Wizard to come close to the capabilities of a dedicated specialists for a short time, but are far better utilized by casting on other characters. For instance Knock allows a Wizard to use their level on a Thievery check to open a Lock and gives everyone who tries to open it a +4 bonus. So lacking a Rogue a Wizard can almost match one, but with a Rogue it becomes much better. Invisibility on a Wizard is nice. Invisibility on a Rogue is phenomenal. Casting Magic Weapon on a Fighter's Sword can turn them into an engine of absolute destruction. A Wizard makes everyone around them much better at the things they are already good at.
Additionally one area where Wizards really strong personal debuffs like Ray of Enfeeblement and Fear. This includes inflictions like Spider Sting and Goblin Pox - debuffs that get worse over the course of a fight or longer in some cases. Basically they can make powerful boss level monsters significantly less dangerous and more vulnerable. These can often be stacked on top of each other to turn a tough encounter into a moderate one.
In many ways playing an arcane caster is not about personal glory. You are at your strongest when you are quietly enabling everyone around you to be significantly more awesome. Giving Blur to a Champion holding back that Owlbear makes the Cleric's job much easier and could be the difference between life and death. That Goblin Pox that made the Owlbear sickened and made it easier to hit had a strong impact, but no one gives the wizard credit. That Slow spell that made that boss monster only have 2 actions for the entire fight. You get the point. You are the enabler of awesomeness.
Then there's the glory moments. Arcane and Primal casters are the undisputed kings of area damage in Pathfinder 2. Other classes do not even come class. The Barbarian can Cleave, but the Wizard and Sorcerer can level the battlefield. Evokers even get a focus power that lets do an extra 1d6 per spell level of the evocation they are casting around them. If a target is hit by both you get to combine the two before applying resistances.
Basically everyone is a specialist in this game and where there is conceptual overlap spell casters do things differently, but not necessarily better. A Medicine specialist can do things that Cleric cannot do and a Cleric can do things a Medicine specialist cannot do. At higher levels Charm allows a Wizard to keep someone friendly indefinitely as long as they devote the spell slot to it while Diplomacy's Make An Impression is more tenuous. However the Diplomacy specialist can Make An Impression on many people at once which magic just can't do. Only Medicine can remove the wounded condition, but only magic can remove a disease in seconds. Only a Divine caster can revive someone who just died as a reaction.