Marathas were still feudals,the reason india was vulnerable was lack of unity,not bravery and a immature military system that had no tradition of large standing army .Another problem was india lacked good horses and while in the ancient age the masses of elephants cowed enemies,from medieval rapid decrease in their population was a military problem.also only large empires can sustain big forces of elephants not small states so they were taken out of the equation.
When we were united under mauryas and guptas the greeks,shakas and huns were repulsed.Hell even gurjar pratihara-rajput alliance defeated arabs and sikhs the durranis and they only were western india.