People in the last 12 months of their life occupy "almost a fifth of Welsh hospital beds", according to a end of life care charity.