You have to just keep below line in your minicart.phtml file to get
updated subtotal ,
This Below line is workig for all cases if cache is enable its working fine,
<span data-bind="html: getCartParam('subtotal')"></span>
For getting value of grandtotal,shipping rate,
You can get GrandTotal, subtotal and shipping rate for current quote using below code in minicart.phtml file, But when cache is enable at that time not update price when you add new product using below method.
<?php
$quote = $block->getTotalsCache();
$getSubTotal = $quote['subtotal']->getData('value');
$getGrandTotal = $quote['grand_total']->getData('value');
$getShippingRate = $quote['shipping']->getData('value');
$finalSubTotal = $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format($getSubTotal,2),true,false);
$finalShippingTotal = $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format($getShippingRate,2),true,false);
$finalGrandTotal = $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format($getGrandTotal,2),true,false);
?>