The soldier in Thomas Hardy's poem is an infantryman. We see this in the first line of the second stanza, when he says "But ranged as infantry." That means he fights in the military. He also mentions in stanza four that he only enlisted in the military because he was out of work.
He thought he'd 'list, perhaps,
Off-hand like — just as I —
Was out of work — had sold his traps —
No other reason why.
In that excerpt, we see that the speaker is thinking about the man that he just killed. He wonders if that man joined just because he was out of a job, like the speaker did. The speaker had "no other reason" to join the military.
We can also assume that the speaker is not wealthy, but also not poor. He is not wealthy enough to not work - since he has to join the military when he loses his job. But he also is wealthy enough to be generous; he claims that he would "treat [the man] if met where any bar is, / Or help [him] to half-a-crown." That means that the speaker has enough money to comfortably buy another man a drink, or to give him some money if he needs it.
We can conclude that the speaker is at least decently educated due to his thought process. He is smart enough to question the war and the peculiarity of fighting against someone you might normally buy a drink for. This suggests an inquisitive mind, rather than a complacent mind that accepts the fighting.
Hope this helps!