Since it's small enough to read into memory all at once, another viable solution would be to use the regex pattern with the regex class' static matches() method.
I've updated your sample text to clearly show the appropriate lines are extracted.
$file = New-TemporaryFile
@'
SOF
I need this from here
1 sample text
2 sample text
3 sample text
4 sample text
5 sample text
6 sample text
To here
I need this from here
7 sample text
8 sample text
9 sample text
10 sample text
11 sample text
To here
.
.
.
.
.
.
EOF
'@ | Set-Content $file -Encoding UTF8
$text = Get-Content $file -raw
[regex]$regex = '(?s)(?<=I need this from here).+?(?=\r?\nTo here)'
$regex.Matches($text) | ForEach-Object {$_.value}
Output

Regex details
(?s) - treat the entire text as a single string. . matches all characters including new lines. May not be needed with the -Raw parameter of Get-Content but needed in other situations.
(?<=) - Positive look behind.
(?=) - Positive look ahead.
.+? - Match any character, as few as possible.
\r?\n = Match new line/carriage return (to avoid adding extra line return to the end of the matched text)
You can take output of $_.value into two different files as desired.
Perhaps something like this
$text = Get-Content $file -raw
[regex]$regex = '(?s)(?<=I need this from here).+?(?=\r?\nTo here)'
$newfiles = $regex.Matches($text) | ForEach-Object {
$tempfile = New-TemporaryFile
Set-Content -Path $tempfile -Value $_.value
Write-Host Output file: $tempfile.FullName
}
Or this
$text = Get-Content $file -raw
[regex]$regex = '(?s)(?<=I need this from here).+?(?=\r?\nTo here)'
$matchedtext = $regex.Matches($text)
for($i = 1; $i -le $matchedtext.count; $i++){
$outfile = Join-Path c:\temp SplitText$i.txt
Set-Content -Path $outfile -Value $matchedtext[$i].value
Write-Host Output file: $outfile
}