Step 1: Classify by element type:
Oxides of strongly electropositive metals are basic, oxides of nonmetals are acidic, and oxides of metals near the metal/nonmetal border (Al, Zn, Sn, Pb) are amphoteric.
Step 2: Apply:
Ba is an alkaline earth metal, so BaO is basic. N and C are nonmetals, so $\text{N}_2\text{O}_5$ and $\text{CO}_2$ are acidic. Aluminium sits at the border and its oxide dissolves in both HCl and NaOH.
Step 3: Conclusion:
Only $\text{Al}_2\text{O}_3$ is amphoteric.
Final Answer:
Option (D), $\text{Al}_2\text{O}_3$, is amphoteric.
\[ \boxed{\text{Al}_2\text{O}_3 \text{ (D)}} \]