I think you only get aggressive expansion if you take territory and physically expand your domain. So if you get attacked by a coalition of ten countries, your diplomatic relations with other nations will be impacted by the fact that you went to war (I think it's about -25, and goes back towards 0 at a rate of +1.7 a year), but unless you ask them to cede territories when you're negotiating peace, you won't incur an additional aggressive expansion penalty.