Check multiple subdirectories and delete if file exists
Your approach is very inefficient  


the array $txtfile is already in memory  
iterating it and per entry searching recursivly the directories (the var $dir in fact also includes files) creates a lot of unneccessary overhead.


$WorkingDir = 'D:\TEST\'
$txtFile = Get-Content "D:\TEST\Files.txt"

Get-ChildItem $WorkingDir -Recurse|ForEach-Object{
    If ($txtFile -contains $_.Name){
        Remove-Item $_.FullName -WhatIf
    }
}



If the output looks OK, remove the trailing -WhatIf