Apparently, the median is $860K and average is $2.7 million for the NFL. MLB is $4.43 average.
NFL has some crazy salaries on the upper end though. I don’t think MLB has a formal or very well structured salary cap.
Players that make it up from the minors are locked to their team for 6 years at the major league level.
First 3 years = minimum wage of around 500K (ironically, this can be some of their best years)
Years 4-6 - Each year, Player and club go to arbitrator to determine salary based on past performance and expected performance. For an average player, it might be 4 mil (year 4), 7 mil (year 5), 10 mil (year 6).
After that they become a free agent. Many players will avoid that 6 year min wage/arbitration process and sign a separate contract if offered by the team.
MLB has no cap, similar to world football. Therefore, the rich teams do the best. However, even lower paying teams like the Tampa Bay Rays can do well because of MLB's drafting system. The draft allows incoming talent from HS or college to be distributed fairly evenly among the teams. It's also a crapshoot whether a player turns good or not, so scouting is huge.
In european football, the big clubs can just pay more for the hugely talented 16-18 year old teenagers and dominate all the young talent. Sure they can't get them all, but it's enough.
MLB allows teams to buy up the talented 28+ year olds but doesn't allow the rich teams to buy up all the young talent.