There is no 'should' in these situations. There are two questions:
1. what have we agreed it means, and
2. what is the optimal use
Of course, for casual partners there is the 3rd question: in the absence of agreement, what is standard? The answer to which may vary from country to country, and with the level of knowledge of partner.
One can of course play the double as penalty, which was the traditional meaning for decades, and is still the one some players use.
Most good players and many not-so-good but interested players use negative doubles here. It is a very sensible method, but it is important that the doubler promise some values, and not merely a desire to compete. Nor should doubler be void in their suit.
Opener is entitled to convert, which is why it makes sense that doubler have enough values that the partnership knows that, at least in principle, it 'owns the hand'. This need not be game-force: just don't do it with a bad 5 count
If one has had no discussion, and partner is not very experienced, and as far as you know doesn't play often with experienced players, it should be penalty. However, one has a clue here. More accurately, two clues.
One is that we hare looking at a heart suit that makes it improbable that partner has as much as Hxx, without which he shouldn't be making a penalty double. However, some opps think it is winning bridge to bid on Jxxxx, and the fact that they play capp over our 1N says that they are probably not very good (capp is a terrible method compared to more modern approaches).
The second clue is that RHO passed. Surely RHO has either long spades or at least 3-3 in the minors, if partner has a double of hearts?
So I would guess that partner has a takeout double.
That doesn't end the question. Passing is a big position. I'd like to have chunkier hearts, and shorter diamonds and a club card. I'd also like to be 4 inches taller, 30 years younger, and with more hair. Oh well.
I am going to bid 3D. We can still get to 3N when right to do so.
'one of the great markers of the advance of human kindness is the howls you will hear from the Men of God' Johann Hari