If you're looking at the total amount spent by "the economy" (drug development costs X% of GDP), sure. If you're looking at "why are drug prices so high", it probably doesn't make sense to to include costs funded from other places (which in this example I assume would be research grants ie taxes, and venture capital funds).