This is an email I wrote to someone asking questions about the word “spirit” and why it is sometimes lower case in the King James Bible (PCE). My correspondence here is a bit rough and ready, but that’s because it’s real.
Starting from a believing, assured view is going to be a helpful thing for you, rather than just “trying to figure” it out.
First, the examples like Judges 3:10 and many others are where a person has a specific anointing come upon them.
Whereas, the examples like Numbers 24:2 and 27:18 are, in the first reference, where a person has insight from God, but is exercising their own spirit, and in the second reference where Joshua was conformed to a godly heart and attitude.
In the examples you give, think about them in comparing these passages:
Jesus in Luke 4:14 (the Holy Ghost), but Matthew 12:18 (like Joshua) and Luke 10:21 (like Balaam).
Paul in Acts 13:9 (like Judges 3:10) but in Acts 18:5 (spiritually motivated).
John the Baptist in Luke 1:15 (the Holy Ghost) but what nature his work Luke 1:17.
Agabus in Acts 21:11 directly speaks from the Holy Ghost as a NT prophet, but in Acts 11:28 exercised his own spirit in the prophetic gift.
Furthermore:
In Joel 2:28, 29 a spiritual outpouring, while Acts 2:17, 18 specifically the person of the Holy Ghost (which explains what a spiritual outpouring in Joel requires).
In 1 Cor. 2:12 the spiritual things and nature of God, but 1 Cor. 2:13, 14, the Holy Ghost is (obviously) involved and vital for it.
And again:
In Acts 10:19 the Holy Ghost speaks words to Peter, but Acts 11:12 Peter is perceiving spiritually in his spirit.
In Acts 8:14, the Holy Ghost does something, but in John 3:6 the work of the Holy Ghost is called spirit.
In 1 John 5:6 the Holy Ghost is the Spirit of truth, bearing witness of the truth, but in 1 John 5:8, this witness is spiritual, received and known in the heart (like assurance, I know that I am born again, and can perceive by my conscience what is right).
All these examples show the distinctions of how the word “spirit” is so used, and this then explains what happened in Numbers 11:25, 29 when what was of Moses was tapped into by others. Now, of course, we know it was the Holy Ghost, but it was talking too about the specific gifts or attributes Moses had. He was a prophet, so the partakers of his spirit prophesied.
Thus, the usage of the word “spirit” has a lot to do with the Holy Ghost connection to the inner man.
I believe as this area is studied out it will be shown as a doctrine, though one that is not well known. (And most Pentecostals themselves would have no clue of it.)