The ticket that you would book through Expedia earns or does not earn miles based on the fare class that it is booked into. Most of my recent Travelocity and Expedia tickets on AA have earned miles.
You can often find fares on these sites that are cheaper than on AA.com as AA.com may have sold its share of seats in that fare class where as Expedia may not have done so.
AA will almost certainly not match the fare you see on Expedia.
The best way to find out, if you still have not bought the ticket would be to call Expedia and ask them what fare class the ticket will be in and then check whether your fare class in eligible on the info available on AA.com