Only your stats modifier is a factor. Unless I'm totally missing something? Martial classes should have a better chance [...]
This was always a really bad design idea in the first place, and D&D5 thankfully doesnt work that way anymore.
For example in Star Wars: Knights of the Old Republic, which was not a D&D3 game but a d20 game, aka a very simplified D&D3 that doesnt cost licensing, it was completely pointless to invest in defense. No matter how hard you tried to maximize your armor class, the opponents would always hit you anyway, because of the riddiculously high attack bonuses they would get from their warrior class.
BG2 was the same. Armor class ? On high levels, you would have one mage that would cast Improved Haste on the tank, a Priest that would casts Regeneration on the tank, and then the tank would attack. Multiply by two and that was the party configuration one would have in BG2, especially in the addon ToB - two mages, two priests, two warriors. Armor class was meaningless, the opponents easily penetrated the best armor class possible.
In D&D5 investing in defense is really worthwhile now. A single armor class more will make a substantial difference in the longterm.
The bonus from proficiency starts at two and gets better only every fourth level after the first level.
Meanwhile yes you have to now actually think about how to improve your attacks. And there are now countless ways to do so, too.
[*]Bard and Paladin for example do not have any features that increase accuracy.[/list]
Err ... out of the top of my head Bards have for example Faerie Fire to improve their attack chances (and reveal invisible opponents).
Paladin has Bless to improve their attack chances.
There are a bazillion ways to improve attack chances in D&D5. Even more so in BG3 where Larian added a lot of their own sauce.